Remove need for boost::function_types library

This commit is contained in:
Jason Turner
2011-09-12 08:18:51 -06:00
parent 194001f9a1
commit 6f282b6a56
5 changed files with 42 additions and 31 deletions

View File

@@ -246,9 +246,9 @@ namespace chaiscript
{
//Can only be used with related polymorphic types
//may be expanded some day to support conversions other than child -> parent
BOOST_STATIC_ASSERT((std::is_base_of<Base,Derived>::value));
BOOST_STATIC_ASSERT(std::is_polymorphic<Base>::value);
BOOST_STATIC_ASSERT(std::is_polymorphic<Derived>::value);
static_assert(std::is_base_of<Base,Derived>::value, "Classes are not related by inheritance");
static_assert(std::is_polymorphic<Base>::value, "Base class must be polymorphic");
static_assert(std::is_polymorphic<Derived>::value, "Derived class must be polymorphic");
return detail::Dynamic_Conversions::create<Base, Derived>();
}