tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
size.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  etl
 

Functions

template<typename C>
constexpr auto size (C const &c) noexcept(noexcept(c.size())) -> decltype(c.size())
 Returns the size of the given container c or array array. Returns c.size(), converted to the return type if necessary.
 
template<typename T, size_t N>
constexpr auto size (T const (&array)[N]) noexcept -> size_t
 
template<typename C>
constexpr auto ssize (C const &c) -> common_type_t< ptrdiff_t, make_signed_t< decltype(c.size())> >
 
template<typename T, ptrdiff_t N>
constexpr auto ssize (T const (&array)[static_cast< size_t >(N)]) noexcept -> ptrdiff_t