Boost logo

Boost :

Subject: Re: [boost] [mpl] Using apply with gcc error
From: Larry Evans (cppljevans_at_[hidden])
Date: 2011-02-03 17:51:21


On 02/03/11 16:42, Edward Diener wrote:
> #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);
> };
>
> int main()
> {
> return 0;
> }
clang complains also:

/home/evansl/download/llvm/svn/build/Debug+Asserts/bin/clang++ -c
-std=c++0x -U__GXX_EXPERIMENTAL_CXX0X__
-I/home/evansl/prog_dev/boost-svn/ro/sandbox/rw/variadic_templates
-I/home/evansl/prog_dev/boost-svn/ro/sandbox/ro/switch
-I/home/evansl/prog_dev/boost-svn/ro/trunk -DTEMPLATE_DEPTH=300
myMF.cpp -MMD -o
/home/evansl/prog_dev/boost-svn/ro/trunk/sandbox-local/build/clangxx/clang/myMF.o

myMF.cpp:20:6: error: use of undeclared identifier 'type'
     BOOST_STATIC_CONSTANT(bool,value=type::value);
     ^
myMF.cpp:20:39: note: instantiated from:
     BOOST_STATIC_CONSTANT(bool,value=type::value);
                                      ^
1 error generated.
m


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk