summaryrefslogtreecommitdiff
path: root/boost/spirit/home/x3/support/traits/container_traits.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/spirit/home/x3/support/traits/container_traits.hpp')
-rw-r--r--boost/spirit/home/x3/support/traits/container_traits.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/boost/spirit/home/x3/support/traits/container_traits.hpp b/boost/spirit/home/x3/support/traits/container_traits.hpp
index 7dcf798958..f2d1086dd2 100644
--- a/boost/spirit/home/x3/support/traits/container_traits.hpp
+++ b/boost/spirit/home/x3/support/traits/container_traits.hpp
@@ -14,7 +14,6 @@
#include <boost/detail/iterator.hpp>
#include <boost/fusion/include/deque.hpp>
#include <boost/tti/has_type.hpp>
-#include <boost/tti/has_member_function.hpp>
#include <boost/mpl/identity.hpp>
#include <vector>
@@ -35,7 +34,6 @@ namespace boost { namespace spirit { namespace x3 { namespace traits
BOOST_TTI_HAS_TYPE(size_type)
BOOST_TTI_HAS_TYPE(reference)
BOOST_TTI_HAS_TYPE(key_type)
- BOOST_TTI_HAS_MEMBER_FUNCTION(reserve)
}
template <typename T>
@@ -49,9 +47,12 @@ namespace boost { namespace spirit { namespace x3 { namespace traits
using is_associative = mpl::bool_<
detail::has_type_key_type<T>::value>;
- template <typename T>
- using is_reservable = mpl::bool_<
- detail::has_member_function_reserve<T, void, mpl::vector<size_t>>::value>;
+ template<typename T, typename Enable = void>
+ struct is_reservable : mpl::false_ {};
+
+ template<typename T>
+ struct is_reservable<T, decltype(std::declval<T&>().reserve(0))>
+ : mpl::true_ {};
///////////////////////////////////////////////////////////////////////////
namespace detail