I'm trying to do a POC of policy based design using the boost-mpl's map container. (code here)
I pass my policies around using an mpl::map, which is empty by default :
typedef boost::mpl::map<> DefaultPolicy;
To get the policy I tried the following:
typedef typename boost::mpl::at<TPolicy, LogPK, DefaultLogP>::type LoggingPolicy;
Instead, I'm getting the following error with g++ 4.81 (and an equivalent one with clang++ 3.3):
main.cpp:49:61: error: wrong number of template arguments (3, should be 2) typedef typename boost::mpl::at<TPolicy, LogPK, DefaultLogP>::type LoggingPolicy; ^
The boost documentation mentions a three-arguments overload for the at template. It looks like it's not located in #include <boost/mpl/at.hpp>. I even searched this overload throught the boost code, without success. The only template I found is the one with two arguments. I failed at googling this issue ("at" is too common).
Is it a boost documentation bug, or has anyone found out how to use this mpl::at overload ?