[aligned storage] namespace conflict

Hi all, while patching the interprocess library (see ticket #5230) we found a namespace conflict in aligned_storage.hpp. The source refers to the (local) namespace "detail::". In the context of interprocess, this could be resolved to "boost::detail" or "boost::interprocess::detail", causing an ambiguity. I suggest to use the absolute namespace in aligned_storage, i.e., every "detail::" is replaced with "::boost::detail::" (see below for the patch). Are there any arguments against this? If nobody protests, Ion would apply the patch. Regards, Tobias Suggested patch: Index: aligned_storage.hpp =================================================================== --- aligned_storage.hpp (revision 70385) +++ aligned_storage.hpp (working copy) @@ -50,7 +50,7 @@ typename mpl::eval_if_c< alignment_ == std::size_t(-1) - , mpl::identity<detail::max_align> + , mpl::identity<::boost::detail::max_align> , type_with_alignment<alignment_> >::type align_; } data_; @@ -76,12 +76,12 @@ #else public #endif - detail::aligned_storage::aligned_storage_imp<size_, alignment_> + ::boost::detail::aligned_storage::aligned_storage_imp<size_, alignment_> { public: // constants - typedef detail::aligned_storage::aligned_storage_imp<size_, alignment_> type; + typedef ::boost::detail::aligned_storage::aligned_storage_imp<size_, alignment_> type; BOOST_STATIC_CONSTANT( std::size_t -- Dr. Tobias Germer | tgermer@think-cell.com Software Engineer think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany http://www.think-cell.com | phone +49 30 666473-10 | US phone +1 800 891 8091 Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306 Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl

AMDG On 03/22/2011 03:37 AM, Tobias Germer wrote:
Index: aligned_storage.hpp =================================================================== --- aligned_storage.hpp (revision 70385) +++ aligned_storage.hpp (working copy) @@ -50,7 +50,7 @@
typename mpl::eval_if_c< alignment_ == std::size_t(-1) - , mpl::identity<detail::max_align> + , mpl::identity<::boost::detail::max_align>
Trigraph alert: You must add a space between '<' and ':'. Otherwise, it means '['. In Christ, Steven Watanabe

[Steven Watanabe]
Trigraph alert: You must add a space between '<' and ':'. Otherwise, it means '['.
Technically, that's known as a digraph. Trigraphs are of the form ??= for # and so forth. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf 2.4 [lex.trigraph] versus 2.6 [lex.digraph] which has the following amusing footnote:
These include "digraphs" and additional reserved words. The term "digraph" (token consisting of two characters) is not perfectly descriptive, since one of the alternative preprocessing-tokens is %:%: and of course several primary tokens contain two characters. Nonetheless, those alternative tokens that aren't lexical keywords are colloquially known as "digraphs".
STL
participants (3)
-
Stephan T. Lavavej
-
Steven Watanabe
-
Tobias Germer