Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
f78d4560
Unverified
Commit
f78d4560
authored
Dec 21, 2020
by
Niels Lohmann
Committed by
GitHub
Dec 21, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2540 from karzhenkov/disrupt-cxx17-tests
Travis doesn't run any tests in C++17 mode
parents
c3c574cf
9493f4be
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
.travis.yml
.travis.yml
+6
-3
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+4
-0
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+4
-0
test/src/unit-conversions.cpp
test/src/unit-conversions.cpp
+0
-4
No files found.
.travis.yml
View file @
f78d4560
...
@@ -210,7 +210,7 @@ matrix:
...
@@ -210,7 +210,7 @@ matrix:
compiler
:
gcc
compiler
:
gcc
env
:
env
:
-
COMPILER=g++-9
-
COMPILER=g++-9
-
CXX
FLAGS=-std=c++2a
-
CXX
_STANDARD=17
addons
:
addons
:
apt
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
sources
:
[
'
ubuntu-toolchain-r-test'
]
...
@@ -294,11 +294,11 @@ matrix:
...
@@ -294,11 +294,11 @@ matrix:
compiler
:
clang
compiler
:
clang
env
:
env
:
-
COMPILER=clang++-7
-
COMPILER=clang++-7
-
CXX
FLAGS=-std=c++1z
-
CXX
_STANDARD=17
addons
:
addons
:
apt
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-trusty-7'
]
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-trusty-7'
]
packages
:
[
'
g++-
6
'
,
'
clang-7'
,
'
ninja-build'
]
packages
:
[
'
g++-
7
'
,
'
clang-7'
,
'
ninja-build'
]
################
################
# build script #
# build script #
...
@@ -321,6 +321,9 @@ script:
...
@@ -321,6 +321,9 @@ script:
# by default, use implicit conversions
# by default, use implicit conversions
-
if [[ "${IMPLICIT_CONVERSIONS}" == "" ]]; then export IMPLICIT_CONVERSIONS=ON; fi
-
if [[ "${IMPLICIT_CONVERSIONS}" == "" ]]; then export IMPLICIT_CONVERSIONS=ON; fi
# append CXX_STANDARD to CMAKE_OPTIONS if required
-
CMAKE_OPTIONS+=${CXX_STANDARD:+ -DCMAKE_CXX_STANDARD=$CXX_STANDARD -DCMAKE_CXX_STANDARD_REQUIRED=ON}
# compile and execute unit tests
# compile and execute unit tests
-
mkdir -p build && cd build
-
mkdir -p build && cd build
-
cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -DJSON_ImplicitConversions=${IMPLICIT_CONVERSIONS} -DJSON_BuildTests=On -GNinja && cmake --build . --config Release
-
cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -DJSON_ImplicitConversions=${IMPLICIT_CONVERSIONS} -DJSON_BuildTests=On -GNinja && cmake --build . --config Release
...
...
include/nlohmann/json.hpp
View file @
f78d4560
...
@@ -73,6 +73,10 @@ SOFTWARE.
...
@@ -73,6 +73,10 @@ SOFTWARE.
#include <nlohmann/json_fwd.hpp>
#include <nlohmann/json_fwd.hpp>
#include <nlohmann/ordered_map.hpp>
#include <nlohmann/ordered_map.hpp>
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
/*!
/*!
@brief namespace for Niels Lohmann
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
@see https://github.com/nlohmann
...
...
single_include/nlohmann/json.hpp
View file @
f78d4560
...
@@ -16663,6 +16663,10 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
...
@@ -16663,6 +16663,10 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
}
// namespace nlohmann
}
// namespace nlohmann
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
/*!
/*!
@brief namespace for Niels Lohmann
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
@see https://github.com/nlohmann
...
...
test/src/unit-conversions.cpp
View file @
f78d4560
...
@@ -48,10 +48,6 @@ using nlohmann::json;
...
@@ -48,10 +48,6 @@ using nlohmann::json;
#define JSON_HAS_CPP_14
#define JSON_HAS_CPP_14
#endif
#endif
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
TEST_CASE
(
"value conversion"
)
TEST_CASE
(
"value conversion"
)
{
{
SECTION
(
"get an object (explicit)"
)
SECTION
(
"get an object (explicit)"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment