
On 2/3/2011 5:58 PM, Jeffrey Lee Hellrung, Jr. wrote:
On 2/3/2011 2:42 PM, Edward Diener wrote:
Compiling this code with gcc:
#include <boost/config.hpp> #include <boost/mpl/apply.hpp>
template < class MF, class T
struct myMF : boost::mpl::apply<MF,T> { BOOST_STATIC_CONSTANT(bool,value=type::value);
AFAIK, since type resides in the base class, which is a dependent type, the compiler won't look in the base class for type; it's looking in namespace scope and there's no type at namespace scope. So you either need a using declaration or explicit qualification. (Some versions of MSVC, at least, happily but incorrectly accept the above code.)
Sorry, no references handy :(
You are correct. I should have realized this, but the MPL book suggestions metafunction forwarding so I used it.