Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Once a part of the standard - will boost library lose its boost namespace and will be moved to std?

Once a Boost library (I have read that ten Boost libs are considered to be a become a part of Standard Library) becomes a part of Standard Library - is it going to keep it's boost namespace or the code will end up in std namespace?

If the latter is the case - how would you workaround that potential namespace clash in your code.

Cheers.

like image 989
Michael Avatar asked Nov 20 '10 08:11

Michael


1 Answers

The items from Boost libraries that made it to the standard will of course be included in namespace std. However, I don't think that their Boost counterpart will change in any way : if we take the example of bind, people compiling C++0x will use std::bind while people compiling C++03 will keep using boost::bind.

I may be wrong, but from my understanding, it's the concepts from boost libraries that made it to the standard, not the exact specifications. As far as I know, boost::bind could very well keep evolving and provide something different from std::bind at some point (hell, I haven't read the C++0x standard yet so I don't have the answer, but std::bind might already be different from boost::bind !).

There is no issue with namespace clash here : each library stands in it own namespace, and you could very well use std::bind and boost::bind in the same C++0x project.

like image 163
icecrime Avatar answered Nov 15 '22 07:11

icecrime