Go to the documentation of this file.
9 #ifndef EAGINE_REFLECT_DECL_NAME_HPP
10 #define EAGINE_REFLECT_DECL_NAME_HPP
12 #include "../memory/span_algo.hpp"
13 #include "../string_span.hpp"
20 constexpr decl_name() noexcept = default;
24 typename = std::enable_if_t<(N <=
span_size_t(max_length))>>
25 constexpr decl_name(const
char (&array)[N]) noexcept
29 class decl_name_storage {
31 static constexpr
const span_size_t max_length = decl_name::max_length;
34 if(str.size() <= max_length) {
46 auto get() const noexcept {
47 return head(
view(_storage), _length);
51 std::array<char, max_length> _storage{};
57 #endif // EAGINE_REFLECT_DECL_NAME_HPP
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
basic_string_span< const char > string_view
Alias for const string views.
Definition: string_span.hpp:116
Common code is placed in this namespace.
Definition: eagine.hpp:21
static constexpr auto cover(T *addr, S size) noexcept -> span_if_mutable< T >
Creates a span starting at the specified pointer and specified length.
Definition: span.hpp:465
static constexpr auto view(T *addr, S size) noexcept -> const_span< T >
Creates a view starting at the specified pointer and specified length.
Definition: span.hpp:458
static constexpr auto head(basic_span< T, P, S > s, L l) noexcept -> basic_span< T, P, S >
Returns the first l elements from the front of a span.
Definition: span_algo.hpp:99
static auto copy(const_block source, block dest) -> block
Copies the content of source block to destination block.
Definition: copy.hpp:23