File indexing completed on 2025-01-18 09:40:25
0001
0002
0003
0004
0005
0006 #ifndef BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP
0007 #define BOOST_MATH_TOOLS_IS_CONST_ITERABLE_HPP
0008
0009 #include <boost/math/tools/cxx03_warn.hpp>
0010
0011 #define BOOST_MATH_HAS_IS_CONST_ITERABLE
0012
0013 #include <boost/math/tools/is_detected.hpp>
0014 #include <utility>
0015
0016 namespace boost {
0017 namespace math {
0018 namespace tools {
0019 namespace detail {
0020
0021 template<class T>
0022 using begin_t = decltype(std::declval<const T&>().begin());
0023 template<class T>
0024 using end_t = decltype(std::declval<const T&>().end());
0025 template<class T>
0026 using const_iterator_t = typename T::const_iterator;
0027
0028 template <class T>
0029 struct is_const_iterable
0030 : public std::integral_constant<bool,
0031 is_detected<begin_t, T>::value
0032 && is_detected<end_t, T>::value
0033 && is_detected<const_iterator_t, T>::value
0034 > {};
0035
0036 } } } }
0037
0038 #endif