8 #ifndef LARCOREALG_COREUTILS_STDUTILS_H
9 #define LARCOREALG_COREUTILS_STDUTILS_H
65 constexpr decltype(
auto)
to_string(T&& obj);
72 constexpr decltype(auto)
begin(T&& obj)
77 constexpr decltype(
auto)
end(T&& obj)
78 {
using std::end;
return end(std::forward<T>(obj)); }
82 constexpr decltype(
auto)
cbegin(T&& obj)
87 constexpr decltype(
auto)
cend(T&& obj)
92 constexpr decltype(
auto)
size(T&& obj)
97 constexpr decltype(
auto)
empty(T&& obj)
106 template <std::
size_t I,
typename T>
107 decltype(
auto)
get(T&& obj)
108 {
using std::get;
return get<I>(std::forward<T>(obj)); }
120 namespace util::details {
123 template <
typename T,
typename =
void>
126 template <
typename U>
134 template <
typename T>
137 template <
typename U>
144 template <
typename T>
148 template <
typename U>
149 static std::string
to_string(U&& obj) {
return { obj.begin(), obj.end() }; }
160 template <
typename T>
161 constexpr decltype(
auto) util::
to_string(T&& obj)
168 #endif // LARCOREALG_COREUTILS_STDUTILS_H
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
std::size_t size(FixedBins< T, C > const &) noexcept
auto cbegin(FixedBins< T, C > const &) noexcept
auto cend(FixedBins< T, C > const &) noexcept
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.
auto end(FixedBins< T, C > const &) noexcept
typename std::enable_if< B, T >::type enable_if_t
static std::string to_string(U &&obj)
auto begin(FixedBins< T, C > const &) noexcept
decltype(auto) get(T &&obj)
std::string to_string(WindowPattern const &pattern)
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)
bool empty(FixedBins< T, C > const &) noexcept
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.