1 // (C) Copyright John Maddock 2018.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP
7 #define BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP
9 #include <boost/math/tools/cxx03_warn.hpp>
11 #define BOOST_MATH_HAS_IS_CONST_ITERABLE
13 #include <boost/math/tools/is_detected.hpp>
22 using begin_t = decltype(std::declval<const T&>().begin());
24 using end_t = decltype(std::declval<const T&>().end());
26 using const_iterator_t = typename T::const_iterator;
29 struct is_const_iterable
30 : public std::integral_constant<bool,
31 is_detected<begin_t, T>::value
32 && is_detected<end_t, T>::value
33 && is_detected<const_iterator_t, T>::value
38 #endif // BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP