C++ Logo

std-proposals

Advanced search

Re: Diamond dependencies and modules

From: Askar Safin <safinaskar_at_[hidden]>
Date: Fri, 24 Jan 2020 00:35:10 +0300
Hi.

> https://www.youtube.com/watch?v=tISy7EJQPzI
Thanks. Now I have watched it.

> struct MyClass {
> std::string s;
> };
> void foo(const MyClass&);
I agree that such constructs break that diamond example.

I think that we still can go with that diamond case (with different versions of common lib) at least in simple case. I. e. when common lib's ABI exposed to its immediate consumers only (MyClass example violates this). We can go using inline namespaces or using linker tricks I described here: https://github.com/vector-of-bool/dds/issues/19#issuecomment-576386677 .

And I wonder whether we can also provide some solution using modules.

Askar Safin

Received on 2020-01-23 15:37:46