|
Boost Users : |
Subject: [Boost-users] [mpl] How to use not_ with has_trivial_destructor metafunction
From: Christian Henning (chhenning_at_[hidden])
Date: 2012-11-21 19:52:30
Hi there,
I have troubles compiling the following code with Visual C++ 2010 and
boost 1.52.
#include <boost/mpl/not.hpp>
#include <boost/type_traits/has_trivial_destructor.hpp>
#include <boost/utility/enable_if.hpp>
template <typename T>
void foo( typename boost::enable_if< boost::mpl::not_<
boost::has_trivial_destructor< T > >
>::type* /*ptr*/ = 0
)
{
int i = 9;
}
int main(int argc, char* argv[])
{
foo< int >();
return 0;
}
The error I'm getting is:
error C2770: invalid explicit template argument(s) for 'void
foo(boost::enable_if<boost::mpl::not_<boost::has_trivial_destructor<T>>>::type
*)'
Can someone see what the problem might be?
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