Closed tomwhoiscontrary closed 1 month ago
Building 1.34, i get:
/root/QuantLib/ql/time/schedule.cpp: In constructor 'QuantLib::Schedule::Schedule(QuantLib::Date, const QuantLib::Date&, const QuantLib::Period&, QuantLib::Calendar, QuantLib::BusinessDayConvention, QuantLib::BusinessDayConvention, QuantLib::DateGeneration::Rule, bool, const QuantLib::Date&, const QuantLib::Date&)': /root/QuantLib/ql/time/schedule.cpp:244:18: error: 'reverse' is not a member of 'std' 244 | std::reverse(dates_.begin(), dates_.end()); | ^~~~~~~ /root/QuantLib/ql/time/schedule.cpp:245:18: error: 'reverse' is not a member of 'std' 245 | std::reverse(isRegular_.begin(), isRegular_.end()); | ^~~~~~~ [ 79%] Building CXX object ql/CMakeFiles/ql_library.dir/utilities/dataformatters.cpp.o make[2]: *** [ql/CMakeFiles/ql_library.dir/build.make:13380: ql/CMakeFiles/ql_library.dir/time/schedule.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:1231: ql/CMakeFiles/ql_library.dir/all] Error 2 make: *** [Makefile:166: all] Error 2
That std::reverse is here.
Your CI tests with GCC 13, so it's strange that i see this and CI didn't. It might be to do with the set of options and compiler flags i'm using. My complete cmake line is:
CXXFLAGS="-O2 -ggdb -Wall -Wno-unknown-pragmas -Werror -std=c++14 -fno-math-errno -fno-trapping-math -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS" cmake .. -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D QL_USE_STD_CLASSES=ON -D QL_USE_INDEXED_COUPON=ON -D QL_ERROR_LINES=ON
I can fix this by adding #include <algorithm> to schedule.cpp.
#include <algorithm>
I haven't tried building master, but the includes in that file haven't changed, so i'm guessing this hasn't been fixed already.
Sure, go ahead—thanks!
Building 1.34, i get:
That std::reverse is here.
Your CI tests with GCC 13, so it's strange that i see this and CI didn't. It might be to do with the set of options and compiler flags i'm using. My complete cmake line is:
I can fix this by adding
#include <algorithm>
to schedule.cpp.I haven't tried building master, but the includes in that file haven't changed, so i'm guessing this hasn't been fixed already.