[cfe-dev] libcxx: inline namespace

Douglas Gregor dgregor at apple.com
Wed May 12 17:09:27 PDT 2010


On May 12, 2010, at 12:48 PM, Howard Hinnant wrote:

> On May 12, 2010, at 2:39 PM, Christopher Jefferson wrote:
> 
>> Has defining all of libcxx in another namespace ( libcxx?) and the 'inline namespace'ing it into std:: been considered? Obviously this would have to wait until there was compiler support.
>> 
>> This would have the advantage that any attempts to link code written in stlport/apachecxx/libstdc++ (where libstdc++ is the most serious concern) with code written using libcxx would fail to link. The obvious disadvantage is that people who look at demangled names would see 'libcxx'. Also if the compiler warnings mention the inlined namespace, that would also be confusing.
> 
> Yes.  The code is set up to do this under a #def in <__config> for everything except for a few "non-versioned" symbols. Non versioned symbols include the exceptions, op new/delete, type_info.

Note that Clang does not yet support inline namespaces, so this behavior is currently turned off under Clang.

	- Doug



More information about the cfe-dev mailing list