Boost logo

Boost :

Subject: Re: [boost] [type_traits] Rewrite and dependency free version
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2015-02-03 17:20:35

On Tue, Feb 3, 2015 at 2:01 PM, Niall Douglas <s_sourceforge_at_[hidden]>

> On 3 Feb 2015 at 22:02, Stephen Kelly wrote:
> > > I confess that I haven't seen this in any way related to C++17. I would
> > > certainly be skeptical of anyone spending any time on something as
> > > speculative
> > > as a future C++ standard before it's finalized.
> >
> > That's no reason not to educate yourself on it, and it's no reason not to
> > try the clang implementation.
> For the record, you can simulate clang's modules using any compiler
> by simply compiling in everything as a single translation unit. A
> simple shell script can create a file which includes all the source
> files at once.
> If it works as a single translation unit, it'll work under clang
> modules. If it doesn't, well then you've got some ODR violation going
> on (very common in source files which assume they own their
> translation unit) and it may or may not work under clang modules
> depending.

Wait, I'm confused... is this actually true? Maybe I'm missing something,
but I can imagine a simple example of an anonymous namespace in two
translation units that define similar functions (i.e. each would have been
defined and used in their own cpp in the multi-translation-unit version).
This is not an ODR violation but it would fail compilation if done as you
suggest. I'm not very familiar with modules as they are currently, but it
seems like the assertion must be erroneous.

-Matt Calabrese

Boost list run by bdawes at, gregod at, cpdaniel at, john at