diff --git a/src/TNL/Containers/Algorithms/ArrayAssignment.h b/src/TNL/Containers/Algorithms/ArrayAssignment.h index 713fcc6ba5db6a2c70f62402225d4daaaadaeb36..28f7557f3d215451b70ef56d3bdce066bfe93fa7 100644 --- a/src/TNL/Containers/Algorithms/ArrayAssignment.h +++ b/src/TNL/Containers/Algorithms/ArrayAssignment.h @@ -10,6 +10,8 @@ #pragma once +#include<type_traits> +#include<utility> #include <TNL/Containers/Algorithms/ArrayOperations.h> namespace TNL { @@ -27,8 +29,8 @@ private: typedef char YesType[1]; typedef char NoType[2]; - template< typename C > static YesType& test( decltype(&C::getArrayData) ); - //template< typename C > static NoType& test(...); + template< typename C > static YesType& test( decltype(std::declval< C >().getArrayData()) ); + template< typename C > static NoType& test(...); public: static constexpr bool value = ( sizeof( test< T >(0) ) == sizeof( YesType ) );