diff --git a/sol/container_traits.hpp b/sol/container_traits.hpp index 665a3274..09332c72 100644 --- a/sol/container_traits.hpp +++ b/sol/container_traits.hpp @@ -340,6 +340,21 @@ namespace sol { static const bool value = sizeof(test(0)) == sizeof(char); }; + template + struct has_traits_size_test { + private: + typedef std::array one; + typedef std::array two; + + template + static one test(decltype(&C::size)); + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == sizeof(char); + }; + template using has_clear = meta::boolean::value>; @@ -383,7 +398,7 @@ namespace sol { using has_traits_add = meta::boolean::value>; template - using has_traits_size = meta::has_size; + using has_traits_size = meta::boolean::value>; template using has_traits_clear = has_clear;