Skip to content

Commit 183a6c0

Browse files
committed
Use c++20 for standalone build
1 parent ebf0786 commit 183a6c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if(INFRA_IS_TOPLEVEL)
3535
cmake_minimum_required(VERSION 3.21)
3636

3737
if(NOT CMAKE_CXX_STANDARD)
38-
set(CMAKE_CXX_STANDARD 17)
38+
set(CMAKE_CXX_STANDARD 20)
3939
endif()
4040

4141
if(INFRA_ENABLE_TESTS)

test/chronotest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
namespace inf::test {
66

7-
using namespace date;
7+
using namespace std::chrono_literals;
88

99
TEST_CASE("ChronoTest.time_point_to_utc_string")
1010
{
11-
chrono::date_point date = 2017_y / feb / 1;
11+
chrono::date_point date = 2017y / std::chrono::February / 1;
1212

1313
CHECK("2017-02-01" == inf::chrono::to_string("%Y-%m-%d", date));
1414
}
1515

1616
TEST_CASE("ChronoTest.time_point_to_string_custom_format")
1717
{
18-
chrono::date_point date = 2017_y / feb / 1;
18+
chrono::date_point date = 2017y / std::chrono::February / 1;
1919

2020
CHECK("2017-02-01" == inf::chrono::to_string("%Y-%m-%d", date));
2121
CHECK("2017-01-02" == inf::chrono::to_string("%Y-%d-%m", date));

0 commit comments

Comments
 (0)