Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Aug 1, 2023
1 parent 6ff3647 commit 343dfae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
4 changes: 3 additions & 1 deletion cmake/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ endif ()

# --------------------- GCC
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines")
if (ENABLE_CPP_20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines")
endif()
#-ftree-slp-vectorize with coroutine cause link error. disable it util gcc fix.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-slp-vectorize")
endif()
Expand Down
17 changes: 0 additions & 17 deletions cmake/platform.cmake

This file was deleted.

8 changes: 4 additions & 4 deletions include/ylt/struct_pack/struct_pack_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ constexpr std::size_t check_circle_impl(std::index_sequence<I...>) {

template <typename Arg, typename... ParentArgs>
constexpr std::size_t check_circle() {
if constexpr (sizeof...(ParentArgs)) {
if constexpr (sizeof...(ParentArgs) != 0) {
return check_circle_impl<Arg, ParentArgs...>(
std::make_index_sequence<sizeof...(ParentArgs)>());
}
Expand Down Expand Up @@ -2079,7 +2079,7 @@ class unpacker {
}
constexpr std::size_t sz = compatible_version_number<Type>.size();
err_code = deserialize_compatibles<T, Args...>(
t, args..., std::make_index_sequence<sz>{});
t, std::make_index_sequence<sz>{}, args...);
}
return err_code;
}
Expand Down Expand Up @@ -2131,7 +2131,7 @@ class unpacker {
}
constexpr std::size_t sz = compatible_version_number<Type>.size();
err_code = deserialize_compatibles<T, Args...>(
t, args..., std::make_index_sequence<sz>{});
t, std::make_index_sequence<sz>{}, args...);
}
return err_code;
}
Expand Down Expand Up @@ -2193,7 +2193,7 @@ class unpacker {
private:
template <typename T, typename... Args, size_t... I>
STRUCT_PACK_INLINE struct_pack::errc deserialize_compatibles(
T &t, Args &...args, std::index_sequence<I...>) {
T &t, std::index_sequence<I...>, Args &...args) {
using Type = get_args_type<T, Args...>;
struct_pack::errc err_code;
switch (size_type_) {
Expand Down

0 comments on commit 343dfae

Please sign in to comment.