Boost logo

Boost :

Subject: [boost] [fusion] inconsistency in size metafunction
From: Jean-Louis Leroy (jl_at_[hidden])
Date: 2009-09-27 09:25:20

Consider :

#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/include/push_back.hpp>
#include <boost/fusion/include/size.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/is_same.hpp>

int main() {
   using namespace boost;
   using namespace fusion;
   typedef vector<int, int> seq1;
   typedef result_of::push_back<vector<int>, int>::type seq2;

One would not expect this to fail, however it does :

'boost::mpl::assertion_failed' : cannot convert parameter 1 from
'boost::mpl::failed ************boost::is_same<T,U>::* ***********' to
1> with
1> [
1> T=boost::mpl::int_<2>,
1> U=boost::mpl::integral_c<int,2>
1> ]


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