8 #ifndef LARCOREALG_COREUTILS_STDUTILS_H 9 #define LARCOREALG_COREUTILS_STDUTILS_H 63 constexpr decltype(
auto)
to_string(T&& obj);
69 constexpr decltype(auto)
begin(T&& obj)
72 return begin(std::forward<T>(obj));
77 constexpr decltype(
auto)
end(T&& obj)
80 return end(std::forward<T>(obj));
85 constexpr decltype(
auto)
cbegin(T&& obj)
88 return cbegin(std::forward<T>(obj));
93 constexpr decltype(
auto)
cend(T&& obj)
96 return cend(std::forward<T>(obj));
100 template <
typename T>
101 constexpr decltype(
auto)
size(T&& obj)
104 return size(std::forward<T>(obj));
108 template <
typename T>
109 constexpr decltype(
auto)
empty(T&& obj)
112 return empty(std::forward<T>(obj));
119 template <std::
size_t I,
typename T>
120 decltype(
auto)
get(T&& obj)
123 return get<I>(std::forward<T>(obj));
138 template <
typename T,
typename =
void>
141 template <
typename U>
151 template <
typename T>
154 template <
typename U>
163 template <
typename T>
166 template <
typename U>
169 return {obj.begin(), obj.end()};
179 template <
typename T>
188 #endif // LARCOREALG_COREUTILS_STDUTILS_H Namespace for general, non-LArSoft-specific utilities.
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
static std::string to_string(U &&obj)
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
static std::string to_string(U &&obj)
static std::string to_string(U &&obj)
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.