C
Christoph Bartoschek
Hi,
I try to use boost::enable_if inside of a constructor but the following code
fails. How can I correct it?
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
template <typename T>
struct Test {
Test() {}
template <typename U>
Test(typename boost::enable_if<
};
class Base {}; class Derived : public Base {};
int main() {
Test<Derived> d;
Test<Base> hb(d);
}
Greetings
Christoph Bartoschek
I try to use boost::enable_if inside of a constructor but the following code
fails. How can I correct it?
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
template <typename T>
struct Test {
Test() {}
template <typename U>
Test(typename boost::enable_if<
{}>::type )
};
class Base {}; class Derived : public Base {};
int main() {
Test<Derived> d;
Test<Base> hb(d);
}
Greetings
Christoph Bartoschek