Boost logo

Boost :

Subject: [boost] [mpl] Using apply with gcc error
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-02-03 17:42:44

Compiling this code with gcc:

#include <boost/config.hpp>
#include <boost/mpl/apply.hpp>

     class MF,
     class T
   struct myMF :

   int main()
     return 0;


TestMFHasTypeMFC.cpp:18:5: error: 'type' has not been declared

     "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -pedantic -g
-Wno-variadic-macros -I"..\..\.."
-I"C:\Programming\VersionControl\boost" -c -o

MF is a metafunction with a boost::mpl::bool_ type. Since I am using
apply using metafunction forwarding, why does gcc tell me that 'type'
has not been declared ? Is this a bug in gcc or in my simple code above ?

The error occurs with all flavors of gcc, but VC++ 8,9,10 gives no error.

Boost list run by bdawes at, gregod at, cpdaniel at, john at