libcxx: inline namespace

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

libcxx: inline namespace

Christopher Jefferson
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.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcxx: inline namespace

Howard Hinnant
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.

-Howard


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcxx: inline namespace

Douglas Gregor

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
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev