Skip to content

Commit 0b45450

Browse files
committed
disable building tests for hh-date on new enough GCC
On GCC 14.2, this won't build for me: include/libyang-cpp/Time.hpp:117:34: error: no matching function for call to ‘parse(const char [21], std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >&)’ The error message is actually the same as in a proposed fix [1], and upstream maintainer has said that they actually recommend relying on the STL on this "new enough" platform. I'm very happy to oblige. We were discussing this last year (I51242fe2ec873fba5954c44e38e898d205a9e484), but at the time this was implemented the build failure was not known, AFAICT, so let's assume that the former use case for building with "new enough STL", but actually forcing HH-date, is no longer important. [1] HowardHinnant/date#866 Change-Id: Id4b0206e2a960686fb1d8e76134b9061d7545d81
1 parent 00f2a7d commit 0b45450

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,6 @@ if(BUILD_TESTING)
129129
add_executable(test_time-stl-hhdate tests/time.cpp)
130130
target_link_libraries(test_time-stl-hhdate DoctestIntegration yang-cpp date::date-tz)
131131
add_test(test_time-stl-hhdate test_time-stl-hhdate)
132-
133-
add_executable(test_time-hhdate tests/time.cpp)
134-
target_link_libraries(test_time-hhdate DoctestIntegration yang-cpp date::date-tz)
135-
target_compile_definitions(test_time-hhdate PUBLIC LIBYANG_CPP_SKIP_STD_CHRONO_TZ)
136-
add_test(test_time-hhdate test_time-hhdate)
137132
endif()
138133
endif()
139134

include/libyang-cpp/Time.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <chrono>
1111
#include "libyang-cpp/export.h"
1212

13-
#if __cpp_lib_chrono >= 201907L && !LIBYANG_CPP_SKIP_STD_CHRONO_TZ
13+
#if __cpp_lib_chrono >= 201907L
1414
namespace libyang {
1515
namespace date_impl = std::chrono;
1616
}

0 commit comments

Comments
 (0)