Skip to content

Commit edd44e2

Browse files
committed
changed the minimum c++ std to 23
1 parent 8c542b7 commit edd44e2

5 files changed

Lines changed: 14 additions & 11 deletions

File tree

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Language: Cpp
3-
Standard: c++20
3+
Standard: c++23
44
DisableFormat: false
55

66

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@ endif()
99

1010
project(cpp-gl
1111
VERSION 2.0.0
12-
DESCRIPTION "General purpose header-only template graph library for C++20"
12+
DESCRIPTION "General purpose header-only template graph library for C++23"
1313
HOMEPAGE_URL "https://github.com/SpectraL519/cpp-gl"
1414
LANGUAGES CXX
1515
)
1616

17+
set(MIN_CXX_STANDARD 23)
1718
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1819
option(BUILD_TESTS "Build project tests" OFF)
1920

2021
# Set the proper cxx standard
2122
if(NOT DEFINED CMAKE_CXX_STANDARD)
22-
set(CMAKE_CXX_STANDARD 20)
23-
elseif(CMAKE_CXX_STANDARD LESS 20)
23+
set(CMAKE_CXX_STANDARD ${MIN_CXX_STANDARD})
24+
elseif(CMAKE_CXX_STANDARD LESS ${MIN_CXX_STANDARD})
2425
message(WARNING "The defined C++ standard (${CMAKE_CXX_STANDARD}) is too low - overriding!")
25-
set(CMAKE_CXX_STANDARD 20)
26+
set(CMAKE_CXX_STANDARD ${MIN_CXX_STANDARD})
2627
endif()
2728
message(STATUS "The C++ standard is set to ${CMAKE_CXX_STANDARD}")
2829

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MIT License
22

33
Copyright (c) 2024 Jakub Musiał
4-
Project: "CPP-GL: General purpose header-only template graph library for C++20 and newer standards."
4+
Project: "CPP-GL: General purpose header-only template graph library for C++23 and newer standards."
55
https://github.com/SpectraL519/cpp-gl
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CPP-GL
22

3-
General purpose header-only template graph library for C++20 and newer standards.
3+
General purpose header-only template graph library for C++23 and newer standards.
44

55
[![g++](https://github.com/SpectraL519/cpp-gl/actions/workflows/gpp.yaml/badge.svg)](https://github.com/SpectraL519/cpp-gl/actions/workflows/g++)
66
[![clang++](https://github.com/SpectraL519/cpp-gl/actions/workflows/clang.yaml/badge.svg)](https://github.com/SpectraL519/cpp-gl/actions/workflows/clang++)
@@ -65,7 +65,7 @@ FetchContent_MakeAvailable(cpp-gl)
6565
add_executable(my_project main.cpp)
6666
6767
set_target_properties(my_project PROPERTIES
68-
CXX_STANDARD 20 # or newer
68+
CXX_STANDARD 23 # or newer
6969
CXX_STANDARD_REQUIRED YES
7070
)
7171
@@ -128,13 +128,14 @@ The instructions and requirements of working on the `CPP-GL` project can be foun
128128

129129
## Compiler support
130130

131+
<!--TODO: verify whether the min compiler version is correct for C++23-->
131132
| Compiler | Min version |
132133
| :-: | :-: |
133-
| GNU G++ | 13 |
134+
| GNU G++ | 13 | #
134135
| Clang | 17 |
135136

136137
> [!NOTE]
137-
> Although currently the project has been properly verified using only the G++ and Clang compilers it should work fine with other compilers with C++20 support like MSVC.
138+
> Although currently the project has been properly verified using only the G++ and Clang compilers it should work fine with other compilers with C++23 support like MSVC.
138139
139140
<br />
140141

tests/source/gl/test_alg_mst.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ TEST_CASE_TEMPLATE_DEFINE(
2323
using weight_type = typename sut_type::edge_properties_type::weight_type;
2424
using distance_type = weight_type;
2525

26-
static_assert(gl::type_traits::c_weight_properties_type<typename sut_type::edge_properties_type>);
26+
static_assert(gl::type_traits::c_weight_properties_type<
27+
typename sut_type::edge_properties_type>);
2728

2829
SUBCASE("should return a proper mst descriptor for a valid graph") {
2930
using vertex_id_pair = std::pair<gl::types::id_type, gl::types::id_type>;

0 commit comments

Comments
 (0)