Boost logo

Boost :

Subject: Re: [boost] [config] request for BOOST_NO_FWD_STD_DECLARATION
From: Loïc Joly (loic.actarus.joly_at_[hidden])
Date: 2011-02-16 12:56:21


Le 16/02/2011 16:30, Christopher Jefferson a écrit :
>
> It can't do, practically (random details follow)
>
> The main purposes of inline namespaces is that the name of the inline namespace gets mangled into the object name, so
>
> namespace std { inline namespace version1 { struct pair; } }
>
> void my_function(std::pair);
>
> The compiler creates a "mangled" string, which represents uniquely this function, including it's name and all the types it accepts. This is used by the linker to connect together calls to functions, and the function definitions.
Ok, I was being dense, and did only consider for instance the use of a
pair* in a class definition, which is internal, not the use of pair in
function declaration, where it is exported.

So, if user cannot forward with inline namespaces, and implementers
really need inline namespaces, I guess the only solution would be to
require implementers special forwarding headers, but I'm afraid it's too
late for that...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk