Hi!
The following piece of code works (finally, sigh),
but I would like to hear some comments on whether and how
one can do better.
#include "boost/mpl/apply_if.hpp"
#include "boost/mpl/identity.hpp"
#include "boost/mpl/lower_bound.hpp"
#include "boost/mpl/deref.hpp"
#include "boost/mpl/find.hpp"
#include "boost/mpl/vector.hpp"
#include "boost/mpl/pair.hpp"
#include "boost/mpl/bool.hpp"
#include "boost/mpl/select1st.hpp"
#include "boost/mpl/select2nd.hpp"
#include "boost/mpl/lambda.hpp"
#include "boost/type_traits/is_same.hpp"
#include <typeinfo>
#include <iostream>
namespace mpl = boost::mpl;
template
decision_sequence;
typedef typename mpl::find_if<
decision_sequence,
boost::is_same
Markus Werle
Hi!
The following piece of code works (finally, sigh), but I would like to hear some comments on whether and how one can do better.
You could remove the illegal "typename" in this line: typedef typename mpl::find_if< It's hard to comment further when I have no idea what it's supposed to be doing. Comments or a little exposition would be a big help. -- Dave Abrahams Boost Consulting www.boost-consulting.com
David Abrahams wrote:
You could remove the illegal "typename" in this line:
typedef typename mpl::find_if<
incredible how sloppy compilers are ...
It's hard to comment further when I have no idea what it's supposed to be doing.
It is supposed to do what it does :-) My question is, whether the code above could be optimized regarding compile time or compactness or whether I missed another feature of mpl.
Comments or a little exposition would be a big help.
The real life version is at
http://tinyurl.com/df99
search for:
template
participants (2)
-
David Abrahams
-
Markus Werle