Warning, file /include/boost/hana/detail/operators/iterable.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_HANA_DETAIL_OPERATORS_ITERABLE_HPP
0011 #define BOOST_HANA_DETAIL_OPERATORS_ITERABLE_HPP
0012
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/fwd/at.hpp>
0015
0016
0017 namespace boost { namespace hana { namespace detail {
0018 template <typename Derived>
0019 struct iterable_operators {
0020 template <typename N>
0021 constexpr decltype(auto) operator[](N&& n) & {
0022 return hana::at(static_cast<Derived&>(*this),
0023 static_cast<N&&>(n));
0024 }
0025
0026 template <typename N>
0027 constexpr decltype(auto) operator[](N&& n) const& {
0028 return hana::at(static_cast<Derived const&>(*this),
0029 static_cast<N&&>(n));
0030 }
0031
0032 template <typename N>
0033 constexpr decltype(auto) operator[](N&& n) && {
0034 return hana::at(static_cast<Derived&&>(*this),
0035 static_cast<N&&>(n));
0036 }
0037 };
0038 } }}
0039
0040 #endif