Skip to content

Commit e2fdcd9

Browse files
committed
Downgrade standart to c++ 11
1 parent 539679a commit e2fdcd9

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [v0.1.10] - 2025-12-?? (2025 Dec ??)
99

10+
- Downgrade min c++ standart to C++11
1011
- Fixed #38: TODO escaping names
1112
- Fixed #24: Auto detect quotes on setValue setName
1213

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ project(wsjcpp-yaml)
2828

2929
# include(${CMAKE_CURRENT_SOURCE_DIR}/src.wsjcpp/CMakeLists.txt)
3030

31-
set(CMAKE_CXX_STANDARD 17)
31+
set(CMAKE_CXX_STANDARD 11)
3232
set(EXECUTABLE_OUTPUT_PATH ${wsjcpp-yaml_SOURCE_DIR})
3333

3434
# Sources

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# wsjcpp-yaml
22

3-
[![Github Stars](https://img.shields.io/github/stars/wsjcpp/wsjcpp-yaml.svg?label=github%20%E2%98%85)](https://github.com/wsjcpp/wsjcpp-yaml) [![Github Stars](https://img.shields.io/github/contributors/wsjcpp/wsjcpp-yaml.svg)](https://github.com/wsjcpp/wsjcpp-yaml) [![Github Forks](https://img.shields.io/github/forks/wsjcpp/wsjcpp-yaml.svg?label=github%20forks)](https://github.com/wsjcpp/wsjcpp-yaml/network/members)
3+
[![Github Stars](https://img.shields.io/github/stars/wsjcpp/wsjcpp-yaml.svg?label=github%20%E2%98%85)](https://github.com/wsjcpp/wsjcpp-yaml) [![Github Stars](https://img.shields.io/github/contributors/wsjcpp/wsjcpp-yaml.svg)](https://github.com/wsjcpp/wsjcpp-yaml) [![Github Forks](https://img.shields.io/github/forks/wsjcpp/wsjcpp-yaml.svg?label=github%20forks)](https://github.com/wsjcpp/wsjcpp-yaml/network/members) [![wsjcpp-yaml C++](https://img.shields.io/badge/C++-11-green.svg)](https://github.com/wsjcpp/wsjcpp-yaml) [![wsjcpp-yaml C++](https://img.shields.io/badge/C++-17-green.svg)](https://github.com/wsjcpp/wsjcpp-yaml)
44

55
C++ YAML parser/reader and writer of *.yaml/*.yml files with keeping user formatting
66

src/tests/test_double_value.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Official Source Code: https://github.com/wsjcpp/wsjcpp-yaml
2828
#include <iostream>
2929
#include <cmath>
3030
#include <fstream>
31+
#include <cfloat>
3132
#include <wsjcpp_yaml.h>
3233
#include "helpers.h"
3334

@@ -63,7 +64,7 @@ int main() {
6364
// std::numeric_limits<double>::epsilon() => 2.22045e-16
6465
// std::numeric_limits<float>::epsilon() => 1.19209e-07
6566
// abs(val_double - expected_double) => 3.31879e-08
66-
if (abs(val_double - expected_double) > std::numeric_limits<float>::epsilon()) {
67+
if (abs(val_double - expected_double) > FLT_EPSILON) {
6768
std::cerr << "Parameter 'double' has value number '" << val_double << "', but expected '" << expected_double << "'" << std::endl;
6869
ret = -1;
6970
}
@@ -78,13 +79,13 @@ int main() {
7879

7980
expected_double = 1.0003f;
8081
val_double = yaml["double"].valDouble();
81-
if (abs(val_double - expected_double) > std::numeric_limits<float>::epsilon()) {
82+
if (abs(val_double - expected_double) > FLT_EPSILON) {
8283
std::cerr << "Parameter 'double' has value number '" << val_double << "', but expected '" << expected_double << "'" << std::endl;
8384
ret = -1;
8485
}
8586
float val_double_like_float = yaml["double"].valFloat();
8687
float expected_float = 1.0003f;
87-
if (abs(val_double_like_float - expected_float) > std::numeric_limits<float>::epsilon()) {
88+
if (abs(val_double_like_float - expected_float) > FLT_EPSILON) {
8889
std::cerr << "Parameter 'double' has value number (like float) '" << val_double_like_float << "', but expected '" << expected_float << "'" << std::endl;
8990
ret = -1;
9091
}

src/tests/test_float_value.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Official Source Code: https://github.com/wsjcpp/wsjcpp-yaml
2828
#include <iostream>
2929
#include <cmath>
3030
#include <fstream>
31+
#include <cfloat>
3132
#include <wsjcpp_yaml.h>
3233
#include "helpers.h"
3334

@@ -62,7 +63,7 @@ int main() {
6263

6364
float val_float = yaml["float"].valFloat();
6465
float expected_float = 1.0001f;
65-
if (abs(val_float - expected_float) > std::numeric_limits<float>::epsilon()) {
66+
if (abs(val_float - expected_float) > FLT_EPSILON) {
6667
std::cerr << "Parameter 'float' has value '" << val_float << "', but expected '" << expected_float << "'" << std::endl;
6768
ret = -1;
6869
}

wsjcpp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
wsjcpp_version: v0.0.1
1+
wsjcpp_version: v0.2.4
22
cmake_minimum_required: 3.0
3-
cmake_cxx_standard: 17
3+
cmake_cxx_standard: 11
44
name: wsjcpp-yaml
55
version: v0.1.10
66
description: Read/Write yaml files

0 commit comments

Comments
 (0)