|
Boost Users : |
Subject: [Boost-users] [enable_if] Compile Time Member Overloading
From: Christian Henning (chhenning_at_[hidden])
Date: 2012-11-18 19:08:17
Hi there,
can someone tell me why the following doesn't compile with VS2010 SP1?
#include <boost/mpl/and.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>
using namespace boost;
struct foo
{
void bla()
{
read_data_24<int, int>();
}
template< typename T1
, typename T2
>
void read_data_24( typename enable_if< mpl::and_< mpl::true_
, mpl::bool_<
is_same< T1, T2 >::type::value >
>
>::type* /* ptr */ = 0
)
{
int i = 9;
}
};
int main(int argc, char* argv[])
{
return 0;
}
I get the error:
1>gil_test_vc10.cpp(25): error C2039: 'type' : is not a member of
'boost::enable_if<Cond>'
1> with
1> [
1>
Cond=boost::mpl::and_<boost::mpl::true_,boost::mpl::bool_<false>>
1> ]
I tried a couple of hours to have make is happen but I don't get it.
Thanks,
Christian
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net