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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
We thought about this a bit and maybe it's because Clang doesn't simply use C++11 or higher. At least with GCC under Linux and VC++ under Windows everything works. Please try to add the following lines to the CMakeLists.txt in the util/tools/date folder:
target_compile_features(date_lib PUBLIC cxx_std_11)
set_target_properties(date_lib PROPERTIES CXX_EXTENSIONS OFF)
error: function definition does not declare
parameters
uint _d{0}, _m{0};
errors. But these symbols are there. The only thing somewhat "special" is the use of the default member initializers = {}, which according to https://en.cppreference.com/w/cpp/language/data_members#Member_initialization are there since C++11. I didn't, but should have, force CMake to compile the code with C++11 rules. So maybe Clang is more picky and tries to compile with C++03 until told otherwise.
If it works that way, either you add it to all the CMakeLists.txt files or you tell me and I gonna do this. As if it doesn't work with date.h/cpp Clang should complain with the other files as well.
8265c8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We develop on Windows and Linux. So this was never tested on MacOS.
Do you have something like an error log.
8265c8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We thought about this a bit and maybe it's because Clang doesn't simply use C++11 or higher. At least with GCC under Linux and VC++ under Windows everything works. Please try to add the following lines to the CMakeLists.txt in the util/tools/date folder:
This is taken from https://cliutils.gitlab.io/modern-cmake/chapters/features/cpp11.html and maybe this helps to force C++11 for the compilation of date.h/date.cpp. The compiler errors don't make sense as it's telling all these
errors. But these symbols are there. The only thing somewhat "special" is the use of the default member initializers = {}, which according to https://en.cppreference.com/w/cpp/language/data_members#Member_initialization are there since C++11. I didn't, but should have, force CMake to compile the code with C++11 rules. So maybe Clang is more picky and tries to compile with C++03 until told otherwise.
If it works that way, either you add it to all the CMakeLists.txt files or you tell me and I gonna do this. As if it doesn't work with date.h/cpp Clang should complain with the other files as well.