![]() |
STD-PROPOSALS |
Subject: Re: [std-proposals] Diamond dependencies and modules
From: Askar Safin (safinaskar_at_[hidden])
Date: 2020-01-23 15:35:10
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
STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org