|
Boost Users : |
Subject: Re: [Boost-users] [type_erasure] BOOST_TYPE_ERASURE_MEMBER within namespace?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-11-23 18:49:18
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net