Skip to content

Commit

Permalink
Fixed the trailing return types being required for substrate::span to…
Browse files Browse the repository at this point in the history
… compile cleanly
  • Loading branch information
dragonmux committed May 10, 2023
1 parent 49a0195 commit 052066b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions substrate/span
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ namespace substrate
{
template<typename...> using void_t = void;

template<typename C> constexpr auto data(C &c) { return c.data(); }
template<typename C> constexpr auto data(const C &c) { return c.data(); }
template<typename C> constexpr auto data(C &c) -> decltype(c.data()) { return c.data(); }
template<typename C> constexpr auto data(const C &c) -> decltype(c.data()) { return c.data(); }
template<typename T, std::size_t N> constexpr T *data(T (&array)[N]) noexcept { return array; }
template<typename E> constexpr const E *data(std::initializer_list<E> il) noexcept { return il.data(); }
template<typename C> constexpr auto size(const C &c) { return c.size(); }
template<typename C> constexpr auto size(const C &c) -> decltype(c.size()) { return c.size(); }
template<typename T, std::size_t N> constexpr std::size_t size(const T (&array)[N]) noexcept { return N; }
template<typename T, std::size_t N> constexpr std::ptrdiff_t ssize(const T (&array)[N]) noexcept
{ return static_cast<std::ptrdiff_t>(N); }
Expand Down

0 comments on commit 052066b

Please sign in to comment.