Skip to content
Snippets Groups Projects
Commit 0a91a265 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Tomáš Oberhuber
Browse files

SFINAE for array asignment seems to be solved.

parent a1a9e5fe
No related branches found
No related tags found
1 merge request!29Revision
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#pragma once #pragma once
#include<type_traits>
#include<utility>
#include <TNL/Containers/Algorithms/ArrayOperations.h> #include <TNL/Containers/Algorithms/ArrayOperations.h>
namespace TNL { namespace TNL {
...@@ -27,8 +29,8 @@ private: ...@@ -27,8 +29,8 @@ private:
typedef char YesType[1]; typedef char YesType[1];
typedef char NoType[2]; typedef char NoType[2];
template< typename C > static YesType& test( decltype(&C::getArrayData) ); template< typename C > static YesType& test( decltype(std::declval< C >().getArrayData()) );
//template< typename C > static NoType& test(...); template< typename C > static NoType& test(...);
public: public:
static constexpr bool value = ( sizeof( test< T >(0) ) == sizeof( YesType ) ); static constexpr bool value = ( sizeof( test< T >(0) ) == sizeof( YesType ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment