Skip to content

Commit

Permalink
fix msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Sep 11, 2024
1 parent be8da74 commit 142e6ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions cmake/subdir.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ endif()
foreach(child ${children})
get_filename_component(subdir_name ${child} NAME)
string(TOUPPER ${subdir_name} subdir_name)
if((${subdir_name} STREQUAL "STRUCT_PACK" OR ${subdir_name} STREQUAL "STRUCT_PB") AND (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"))
message(STATUS "skip ${subdir_name}")
continue()
endif()

if (BUILD_${subdir_name})
message(STATUS "BUILD_${subdir_name}: ${BUILD_${subdir_name}}")
Expand Down
10 changes: 5 additions & 5 deletions include/ylt/reflection/member_count.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
#endif

#include "user_reflect_macro.hpp"

namespace struct_pack {
template <typename T, uint64_t version>
struct compatible;
}
namespace ylt::reflection {
template <typename T>
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;
Expand Down Expand Up @@ -87,14 +90,11 @@ template <typename T>
constexpr bool tuple_size = tuple_size_impl<T>::value;
#endif

template <typename T, uint64_t version = 0>
struct compatible;

template <typename Type>
constexpr inline bool is_compatible_v = false;

template <typename Type, uint64_t version>
constexpr inline bool is_compatible_v<compatible<Type, version>> = true;
constexpr inline bool is_compatible_v<struct_pack::compatible<Type, version>> = true;

struct UniversalVectorType {
template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion include/ylt/reflection/member_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// modified based on:
// https://github.com/getml/reflect-cpp/blob/main/include/rfl/internal/bind_fake_object_to_tuple.hpp
// thanks for alxn4's greate idea!
// thanks for alxn4's great idea!
namespace ylt::reflection {
namespace internal {

Expand Down

0 comments on commit 142e6ab

Please sign in to comment.