Boost logo

Boost :

From: Daniela Engert (dani_at_[hidden])
Date: 2024-04-09 05:25:49


Am 09.04.2024 um 01:14 schrieb René Ferdinand Rivera Morell via Boost:
> On Mon, Apr 8, 2024 at 6:03 PM Stephan T. Lavavej via Boost
> <boost_at_[hidden]> wrote:
>> For reasons that I completely do not understand with my cat-sized brain that is barely able to print "3.14", I believe that only MSVC has chosen the strong ownership strategy, while Clang and GCC have chosen "weak ownership" (which is perhaps easier to understand - with that strategy, details::make_noise() isn't specially affected by whether it appears in module Cats or module Dogs, so you get the same kind of ODR violation that classic headers would produce). Apparently compiler devs feel really strongly about both sides of this issue and I don't know why.
> It's my understanding that both clang and gcc are moving, or have
> moved, to strong ownership also.
>
Right, at least clang has. It was the intent of both compiler teams to
leave the weak ownership model behind. Over the course of multiple
versions (beginning with clang 16), that transition caused clang to
struggle with correctly forming linker symbols and deficiencies in the
Itanium ABI which made it impossible (in non-obvious ways) to use
modules (like Asio) at scale.

Related to the chosen ownership model, there is the notion of
"attachment". That's something most developers are unfamiliar with or
never have heard about. For a starter, people might want to look here:
https://www.reddit.com/r/cpp/comments/1busseu/comment/kxw409i/ . My
talks on modules touch on that subject, too, including the consequences.
Adding language linkage specifications to non-exported declarations is
the lever to "detach" entities from the module they morally belong to.

Thanks
Dani

-- 
PGP/GPG: 2CCB 3ECB 0954 5CD3 B0DB 6AA0 BA03 56A1 2C4638C5

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk