[PATCH] D57906: [CTU] Do not allow different CPP dialects in CTU
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 8 07:32:40 PST 2019
Quuxplusone added a comment.
> Consider this STL code:
>
> template<typename _Alloc>
> struct __alloc_traits
> #if __cplusplus >= 201103L
> : std::allocator_traits<_Alloc>
> #endif
> { // ...
> };
>
>
> This class template would create ODR errors during merging the two units,
> since in one translation unit the class template has a base class, however
> in the other unit it has none.
How is `#if __cplusplus >= 201103L` qualitatively different from `#ifndef NDEBUG` or `#if MYLIB_ABI_VERSION==2` or `#if __DATE__ == "2018-04-01"`?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57906/new/
https://reviews.llvm.org/D57906
More information about the cfe-commits
mailing list