C++ Logo


Advanced search

Re: [std-proposals] Concept of Libraries in C and C++

From: Henry Miller <hank_at_[hidden]>
Date: Mon, 03 Apr 2023 09:21:51 -0500
On Sun, Apr 2, 2023, at 10:04, Ville Voutilainen via Std-Proposals wrote:
> I'm not exactly sure of two things:
> 1) what are you trying to accomplish?
> 2) why?
> Libraries are not programs. They are merely binary artifacts that can
> be combined into a program, via a (dynamic) linker. They contain
> translation
> units, but no programs.

I'm not the OP, but I've long wanted a concept of shared libraries because on my system violated the one-definition-rule is defined behavior. There is set of rules for what definition takes precedence if there is more than one definition in the program. While it is rare I have sometimes found it useful to have a second definition of some symbol in my programs (ie to override some system call), and I want to raise this out of undefined behavior territory.

Received on 2023-04-03 14:22:12