Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CXX-20 MODULES - global module fragment support #1202

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/flecs/addons/cpp/component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace _ {

#if defined(__GNUC__) || defined(_WIN32)
template <typename T>
inline static const char* type_name() {
inline const char* type_name() {
static const size_t len = ECS_FUNC_TYPE_LEN(const char*, type_name, ECS_FUNC_NAME);
static char result[len + 1] = {};
static const size_t front_len = ECS_FUNC_NAME_FRONT(const char*, type_name);
Expand All @@ -43,7 +43,7 @@ inline static const char* type_name() {
// Translate a typename into a language-agnostic identifier. This allows for
// registration of components/modules across language boundaries.
template <typename T>
inline static const char* symbol_name() {
inline const char* symbol_name() {
static const size_t len = ECS_FUNC_TYPE_LEN(const char*, symbol_name, ECS_FUNC_NAME);
static char result[len + 1] = {};
return ecs_cpp_get_symbol_name(result, type_name<T>(), len);
Expand Down
10 changes: 5 additions & 5 deletions include/flecs/addons/cpp/utils/signature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ namespace flecs {
namespace _ {

template <typename T, if_t< is_const_p<T>::value > = 0>
static constexpr flecs::inout_kind_t type_to_inout() {
constexpr flecs::inout_kind_t type_to_inout() {
return flecs::In;
}

template <typename T, if_t< is_reference<T>::value > = 0>
static constexpr flecs::inout_kind_t type_to_inout() {
constexpr flecs::inout_kind_t type_to_inout() {
return flecs::Out;
}

template <typename T, if_not_t<
is_const_p<T>::value || is_reference<T>::value > = 0>
static constexpr flecs::inout_kind_t type_to_inout() {
constexpr flecs::inout_kind_t type_to_inout() {
return flecs::InOutDefault;
}

template <typename T, if_t< is_pointer<T>::value > = 0>
static constexpr flecs::oper_kind_t type_to_oper() {
constexpr flecs::oper_kind_t type_to_oper() {
return flecs::Optional;
}

template <typename T, if_not_t< is_pointer<T>::value > = 0>
static constexpr flecs::oper_kind_t type_to_oper() {
constexpr flecs::oper_kind_t type_to_oper() {
return flecs::And;
}

Expand Down