Skip to content

Commit

Permalink
Fix std::initializer_list
Browse files Browse the repository at this point in the history
Signed-off-by: WenTao Ou <[email protected]>
  • Loading branch information
owent committed Jun 20, 2022
1 parent e87de0b commit a24026f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/libcopp/utils/std/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,18 @@ using std::span;
}
LIBCOPP_COPP_NAMESPACE_END
#else
// clang-format off
#include <libcopp/utils/config/stl_include_prefix.h> // NOLINT(build/include_order)
// clang-format on
# include <assert.h>
# include <array>
# include <cstddef>
# include <initializer_list>
# include <iterator>
# include <type_traits>
// clang-format off
#include <libcopp/utils/config/stl_include_suffix.h> // NOLINT(build/include_order)
// clang-format on

LIBCOPP_COPP_NAMESPACE_BEGIN
namespace nostd {
Expand Down Expand Up @@ -57,7 +64,7 @@ constexpr inline T *data(T (&_Array)[SIZE]) noexcept {
}

template <class _Elem>
constexpr inline const _Elem *data(initializer_list<_Elem> _Ilist) noexcept {
constexpr inline const _Elem *data(std::initializer_list<_Elem> _Ilist) noexcept {
return _Ilist.begin();
}

Expand Down

0 comments on commit a24026f

Please sign in to comment.