mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
put headers in include/magic_enum directory
This commit is contained in:
parent
5523803cfc
commit
eb867ec9ba
14 changed files with 20 additions and 19 deletions
|
|
@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "magic_enum",
|
name = "magic_enum",
|
||||||
hdrs = glob(["include/*.hpp"]),
|
hdrs = glob(["include/magic_enum/*.hpp"]),
|
||||||
copts = COPTS,
|
copts = COPTS,
|
||||||
includes = ["include"],
|
includes = ["include"],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
|
||||||
project(magic_enum
|
project(magic_enum
|
||||||
VERSION "0.9.3"
|
VERSION "0.9.4"
|
||||||
HOMEPAGE_URL "https://github.com/Neargye/magic_enum"
|
HOMEPAGE_URL "https://github.com/Neargye/magic_enum"
|
||||||
DESCRIPTION "A library that provides static reflection for enums, work with any enum type without any macro or boilerplate code."
|
DESCRIPTION "A library that provides static reflection for enums, work with any enum type without any macro or boilerplate code."
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
|
|
@ -32,7 +32,7 @@ if(MAGIC_ENUM_OPT_BUILD_TESTS)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
set(INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include/magic_enum")
|
||||||
set(EXPORT_NAMESPACE "${PROJECT_NAME}::")
|
set(EXPORT_NAMESPACE "${PROJECT_NAME}::")
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} INTERFACE)
|
add_library(${PROJECT_NAME} INTERFACE)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module(
|
module(
|
||||||
name = "magic_enum",
|
name = "magic_enum",
|
||||||
version = "0.9.3",
|
version = "0.9.4",
|
||||||
compatibility_level = 0,
|
compatibility_level = 0,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
#define MAGIC_ENUM_VERSION_MAJOR 0
|
#define MAGIC_ENUM_VERSION_MAJOR 0
|
||||||
#define MAGIC_ENUM_VERSION_MINOR 9
|
#define MAGIC_ENUM_VERSION_MINOR 9
|
||||||
#define MAGIC_ENUM_VERSION_PATCH 3
|
#define MAGIC_ENUM_VERSION_PATCH 4
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
@ -829,8 +829,8 @@ inline constexpr auto max_v = (count_v<E, S> > 0) ? static_cast<U>(values_v<E, S
|
||||||
|
|
||||||
template <typename E, enum_subtype S, std::size_t... I>
|
template <typename E, enum_subtype S, std::size_t... I>
|
||||||
constexpr auto names(std::index_sequence<I...>) noexcept {
|
constexpr auto names(std::index_sequence<I...>) noexcept {
|
||||||
constexpr auto result = std::array<string_view, sizeof...(I)>{{enum_name_v<E, values_v<E, S>[I]>...}};
|
constexpr auto names = std::array<string_view, sizeof...(I)>{{enum_name_v<E, values_v<E, S>[I]>...}};
|
||||||
return result;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename E, enum_subtype S>
|
template <typename E, enum_subtype S>
|
||||||
|
|
@ -841,7 +841,8 @@ using names_t = decltype((names_v<D, S>));
|
||||||
|
|
||||||
template <typename E, enum_subtype S, std::size_t... I>
|
template <typename E, enum_subtype S, std::size_t... I>
|
||||||
constexpr auto entries(std::index_sequence<I...>) noexcept {
|
constexpr auto entries(std::index_sequence<I...>) noexcept {
|
||||||
return std::array<std::pair<E, string_view>, sizeof...(I)>{{{values_v<E, S>[I], enum_name_v<E, values_v<E, S>[I]>}...}};
|
constexpr auto entries = std::array<std::pair<E, string_view>, sizeof...(I)>{{{values_v<E, S>[I], enum_name_v<E, values_v<E, S>[I]>}...}};
|
||||||
|
return entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename E, enum_subtype S>
|
template <typename E, enum_subtype S>
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
// | | | | (_| | (_| | | (__ | |____| | | | |_| | | | | | | | |____|_| |_|
|
||||||
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
// |_| |_|\__,_|\__, |_|\___| |______|_| |_|\__,_|_| |_| |_| \_____|
|
||||||
// __/ | https://github.com/Neargye/magic_enum
|
// __/ | https://github.com/Neargye/magic_enum
|
||||||
// |___/ version 0.9.3
|
// |___/ version 0.9.4
|
||||||
//
|
//
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
project(
|
project(
|
||||||
'magic_enum', ['cpp'],
|
'magic_enum', ['cpp'],
|
||||||
default_options: ['cpp_std=c++17'],
|
default_options: ['cpp_std=c++17'],
|
||||||
version: '0.9.3',
|
version: '0.9.4',
|
||||||
)
|
)
|
||||||
|
|
||||||
magic_enum_include = include_directories('include')
|
magic_enum_include = include_directories('include')
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<package format="2">
|
<package format="2">
|
||||||
<name>magic_enum</name>
|
<name>magic_enum</name>
|
||||||
<version>0.9.3</version>
|
<version>0.9.4</version>
|
||||||
<description>
|
<description>
|
||||||
Static reflection for enums (to string, from string, iteration) for modern C++,
|
Static reflection for enums (to string, from string, iteration) for modern C++,
|
||||||
work with any enum type without any macro or boilerplate code
|
work with any enum type without any macro or boilerplate code
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue