You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when i build this project by cmake (WSL2 and GCC 9/11+), i get some errors :
[build] In file included from /home/user/schwarzwald/schwarzwald/util/./logging/Journal.h:5,
[build] from /home/user/schwarzwald/schwarzwald/core/process/Tiler.cpp:8:
[build] /home/user/schwarzwald/schwarzwald/util/./logging/Journal.h: In instantiation of ‘constexpr bool logging::detail::is_flat_trivial_type() [with T = ThroughputStats]’:
[build] /home/user/schwarzwald/schwarzwald/util/./logging/Journal.h:502:74: required from ‘constexpr const bool logging::IsFlatTrivialType<ThroughputStats>’
[build] /home/user/schwarzwald/schwarzwald/util/./logging/Journal.h:891:17: required from ‘logging::JournalBuilderWithType<logging::VectorStorage<T> > logging::JournalBuilder::with_flat_type() [with T = ThroughputStats]’
[build] /home/user/schwarzwald/schwarzwald/core/process/Tiler.cpp:112:39: required from here
[build] /home/user/schwarzwald/schwarzwald/util/./logging/Journal.h:425:55: in ‘constexpr’ expansion of ‘refl::members_of<ThroughputStats>()’
[build] /home/user/schwarzwald/schwarzwald/util/./types/MembersOf.h:116:43: in ‘constexpr’ expansion of ‘refl::detail::members_of_aggregate<ThroughputStats>()’
[build] /home/user/schwarzwald/schwarzwald/util/./types/MembersOf.h:57:16: error: ‘reinterpret_cast’ is not a constant expression
[build] 57 | T* dummy = reinterpret_cast<T*>(&mem);
[build] | ^~~~~~~~~~~~~~~~~~~~~~~~~~
[build] In file included from /home/user/schwarzwald/schwarzwald/core/process/Tiler.cpp:8:
[build] /home/user/schwarzwald/schwarzwald/util/./logging/Journal.h: In instantiation of ‘logging::JournalBuilderWithType<logging::VectorStorage<T> > logging::JournalBuilder::with_flat_type() [with T = ThroughputStats]’:
[build] /home/user/schwarzwald/schwarzwald/core/process/Tiler.cpp:112:39: required from here
[build] /home/user/schwarzwald/schwarzwald/util/./logging/Journal.h:891:17: error: non-constant condition for static assertion
[build] 891 | static_assert(IsFlatTrivialType<T>,
[build] | ^~~~~~~~~~~~~~~~~~~~
[build] gmake[2]: *** [schwarzwald/core/CMakeFiles/SchwarzwaldCore.dir/build.make:426: schwarzwald/core/CMakeFiles/SchwarzwaldCore.dir/process/Tiler.cpp.o] Error 1
[build] gmake[1]: *** [CMakeFiles/Makefile2:1611: schwarzwald/core/CMakeFiles/SchwarzwaldCore.dir/all] Error 2
[build] gmake: *** [Makefile:136: all] Error 2
I found this to be the wrong way to use, we should not use reinterpret_cast in constexpr function, but i know this project compiles on GCC 7+ and successfully. If i want to use GCC 9/11+, what should i do?
Thank you!
The text was updated successfully, but these errors were encountered:
Hi, when i build this project by cmake (WSL2 and GCC 9/11+), i get some errors :
I found this to be the wrong way to use, we should not use
reinterpret_cast
inconstexpr
function, but i know this project compiles on GCC 7+ and successfully. If i want to use GCC 9/11+, what should i do?Thank you!
The text was updated successfully, but these errors were encountered: