diff --git a/include/core/typeinfo.h b/include/core/typeinfo.h index 34c3324e63..537171348b 100644 --- a/include/core/typeinfo.h +++ b/include/core/typeinfo.h @@ -28,19 +28,7 @@ #ifndef SWIG -#include - -template -struct remove_pointer -{ - typedef T type; -}; - -template -struct remove_pointer -{ - typedef typename remove_pointer::type type; -}; +#include /** * Function IsA() @@ -52,13 +40,13 @@ struct remove_pointer template bool IsA( const I* aObject ) { - return aObject && remove_pointer::type::ClassOf( aObject ); + return aObject && std::remove_pointer::type::ClassOf( aObject ); } template bool IsA( const I& aObject ) { - return remove_pointer::type::ClassOf( &aObject ); + return std::remove_pointer::type::ClassOf( &aObject ); } /** @@ -72,10 +60,10 @@ bool IsA( const I& aObject ) template Casted dyn_cast( From aObject ) { - if( remove_pointer::type::ClassOf ( aObject ) ) + if( std::remove_pointer::type::ClassOf ( aObject ) ) return static_cast( aObject ); - return NULL; + return nullptr; } class EDA_ITEM;