From 3a728f41027f1fd548d94f2a651ea6db52f9c550 Mon Sep 17 00:00:00 2001 From: neargye Date: Wed, 18 May 2022 18:31:02 +0400 Subject: [PATCH] clean-up --- include/nameof.hpp | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/include/nameof.hpp b/include/nameof.hpp index 4f143c8..73edc63 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -300,6 +300,22 @@ class [[nodiscard]] cstring<0> { [[nodiscard]] constexpr size_type size() const noexcept { return 0; } + [[nodiscard]] constexpr const_iterator begin() const noexcept { return nullptr; } + + [[nodiscard]] constexpr const_iterator end() const noexcept { return nullptr; } + + [[nodiscard]] constexpr const_iterator cbegin() const noexcept { return nullptr; } + + [[nodiscard]] constexpr const_iterator cend() const noexcept { return nullptr; } + + [[nodiscard]] constexpr const_reverse_iterator rbegin() const noexcept { return {}; } + + [[nodiscard]] constexpr const_reverse_iterator rend() const noexcept { return {}; } + + [[nodiscard]] constexpr const_reverse_iterator crbegin() const noexcept { return {}; } + + [[nodiscard]] constexpr const_reverse_iterator crend() const noexcept { return {}; } + [[nodiscard]] constexpr size_type length() const noexcept { return 0; } [[nodiscard]] constexpr bool empty() const noexcept { return true; } @@ -1084,18 +1100,18 @@ template // Obtains type name, reference and cv-qualifiers are ignored. #define NAMEOF_TYPE(...) ::nameof::nameof_type<__VA_ARGS__>() -// Obtains type name of expression, reference and cv-qualifiers are ignored. -#define NAMEOF_TYPE_EXPR(...) ::nameof::nameof_type() - // Obtains full type name, with reference and cv-qualifiers. #define NAMEOF_FULL_TYPE(...) ::nameof::nameof_full_type<__VA_ARGS__>() -// Obtains full type name of expression, with reference and cv-qualifiers. -#define NAMEOF_FULL_TYPE_EXPR(...) ::nameof::nameof_full_type() - // Obtains short type name. #define NAMEOF_SHORT_TYPE(...) ::nameof::nameof_short_type<__VA_ARGS__>() +// Obtains type name of expression, reference and cv-qualifiers are ignored. +#define NAMEOF_TYPE_EXPR(...) ::nameof::nameof_type() + +// Obtains full type name of expression, with reference and cv-qualifiers. +#define NAMEOF_FULL_TYPE_EXPR(...) ::nameof::nameof_full_type() + // Obtains short type name of expression. #define NAMEOF_SHORT_TYPE_EXPR(...) ::nameof::nameof_short_type()