[type_erasure] BOOST_TYPE_ERASURE_MEMBER within namespace?
I find that using BOOST_TYPE_ERASURE_MEMBER within my own namespace fails with compilation errors: myprog.cpp:23:1: error: no template named 'concept_interface'; did you mean '::boost::type_erasure::concept_interface'? This is with Boost 1.57, compiled with Apple clang from Xcode 7.1.1. Moving BOOST_TYPE_ERASURE_MEMBER to the global namespace allows successful compilation. I would rather avoid putting my has_member names into the global namespace. How to achieve that?
AMDG On 11/23/2015 03:05 PM, Nat Goodspeed wrote:
I find that using BOOST_TYPE_ERASURE_MEMBER within my own namespace fails with compilation errors:
myprog.cpp:23:1: error: no template named 'concept_interface'; did you mean '::boost::type_erasure::concept_interface'?
This is with Boost 1.57, compiled with Apple clang from Xcode 7.1.1.
Moving BOOST_TYPE_ERASURE_MEMBER to the global namespace allows successful compilation.
I would rather avoid putting my has_member names into the global namespace. How to achieve that?
Include the namespaces with the concept name. BOOST_TYPE_ERASURE_MEMBER((boost)(has_push_back), push_back, 1) typedef boost::has_push_back<void(int), _self> push_back_concept; See http://www.boost.org/doc/html/BOOST_TYPE_ERASURE_MEMBER.html. In Christ, Steven Watanabe
participants (2)
-
Nat Goodspeed
-
Steven Watanabe