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
494cc156
Commit
494cc156
authored
Jun 07, 2016
by
Niels
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/issue260
parents
b508d1f1
48f69f40
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
50 deletions
+81
-50
.travis.yml
.travis.yml
+63
-34
src/json.hpp
src/json.hpp
+9
-8
src/json.hpp.re2c
src/json.hpp.re2c
+9
-8
No files found.
.travis.yml
View file @
494cc156
...
...
@@ -44,6 +44,21 @@ matrix:
branch_pattern
:
coverity_scan
env
:
COMPILER=g++-5
# from https://github.com/travis-ci/travis-ci/issues/6120
-
os
:
linux
env
:
-
LLVM_VERSION=3.8.0
-
LLVM_ARCHIVE_PATH=$HOME/clang+llvm.tar.xz
-
COMPILER=clang++
-
CPPFLAGS="-I $HOME/clang-$LLVM_VERSION/include/c++/v1"
-
CXXFLAGS=-lc++
-
PATH=$HOME/clang-$LLVM_VERSION/bin:$PATH
-
LD_LIBRARY_PATH=$HOME/clang-$LLVM_VERSION/lib:$LD_LIBRARY_PATH
before_install
:
-
wget http://llvm.org/releases/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-linux-gnu-ubuntu-14.04.tar.xz -O $LLVM_ARCHIVE_PATH
-
mkdir $HOME/clang-$LLVM_VERSION
-
tar xf $LLVM_ARCHIVE_PATH -C $HOME/clang-$LLVM_VERSION --strip-components
1
# - os: linux
# compiler: gcc
# addons:
...
...
@@ -55,29 +70,29 @@ matrix:
# Clang 3.5 is not able to compile the code,
# see https://travis-ci.org/nlohmann/json/jobs/126720186
-
os
:
linux
compiler
:
clang
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-precise-3.6'
]
packages
:
[
'
clang-3.6'
,
'
valgrind'
]
env
:
COMPILER=clang++-3.6
-
os
:
linux
compiler
:
clang
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-precise-3.7'
]
packages
:
[
'
clang-3.7'
,
'
valgrind'
]
env
:
COMPILER=clang++-3.7
-
os
:
linux
compiler
:
clang
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
,
'
llvm-toolchain-precise-3.8'
]
packages
:
[
'
clang-3.8'
,
'
valgrind'
]
env
:
COMPILER=clang++-3.8
#
- os: linux
#
compiler: clang
#
addons:
#
apt:
#
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
#
packages: ['clang-3.6', 'valgrind']
#
env: COMPILER=clang++-3.6
#
#
- os: linux
#
compiler: clang
#
addons:
#
apt:
#
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
#
packages: ['clang-3.7', 'valgrind']
#
env: COMPILER=clang++-3.7
#
#
- os: linux
#
compiler: clang
#
addons:
#
apt:
#
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
#
packages: ['clang-3.8', 'valgrind']
#
env: COMPILER=clang++-3.8
# - os: linux
# compiler: clang
...
...
@@ -90,42 +105,56 @@ matrix:
-
os
:
osx
osx_image
:
beta-xcode6.1
compiler
:
clang
env
:
COMPILER=clang
env
:
-
COMPILER=clang
-
CXXFLAGS=-lstdc++
-
os
:
osx
osx_image
:
beta-xcode6.2
compiler
:
clang
env
:
COMPILER=clang
env
:
-
COMPILER=clang
-
CXXFLAGS=-lstdc++
# - os: osx
# osx_image: beta-xcode6.3
# compiler: clang
# env: COMPILER=clang
-
os
:
osx
osx_image
:
beta-xcode6.3
compiler
:
clang
env
:
-
COMPILER=clang
-
CXXFLAGS=-lstdc++
-
os
:
osx
osx_image
:
xcode6.4
compiler
:
clang
env
:
COMPILER=clang
env
:
-
COMPILER=clang
-
CXXFLAGS=-lstdc++
-
os
:
osx
osx_image
:
xcode7.1
compiler
:
clang
env
:
COMPILER=clang
env
:
-
COMPILER=clang
-
CXXFLAGS=-lstdc++
-
os
:
osx
osx_image
:
xcode7.2
compiler
:
clang
env
:
COMPILER=clang
env
:
-
COMPILER=clang
-
CXXFLAGS=-lstdc++
-
os
:
osx
osx_image
:
xcode7.3
compiler
:
clang
env
:
COMPILER=clang
env
:
-
COMPILER=clang
-
CXXFLAGS=-lstdc++
script
:
-
uname -a
-
$COMPILER --version
-
make CXX=$COMPILER
CXXFLAGS="-lstdc++"
-
make CXX=$COMPILER
-
./json_unit "*"
-
if [ `which valgrind` ]; then
valgrind --error-exitcode=1 --leak-check=full ./json_unit ;
...
...
src/json.hpp
View file @
494cc156
...
...
@@ -1461,13 +1461,13 @@ class basic_json
@since version 2.0.0
*/
template
<
typename
CompatibleNumberUnsignedType
,
typename
template
<
typename
CompatibleNumberUnsignedType
,
typename
std
::
enable_if
<
std
::
is_constructible
<
number_unsigned_t
,
CompatibleNumberUnsignedType
>
::
value
and
std
::
numeric_limits
<
CompatibleNumberUnsignedType
>::
is_integer
and
!
std
::
numeric_limits
<
CompatibleNumberUnsignedType
>::
is_signed
,
CompatibleNumberUnsignedType
>::
type
=
0
>
not
std
::
numeric_limits
<
CompatibleNumberUnsignedType
>::
is_signed
,
CompatibleNumberUnsignedType
>::
type
=
0
>
basic_json
(
const
CompatibleNumberUnsignedType
val
)
noexcept
:
m_type
(
value_t
::
number_unsigned
),
m_value
(
static_cast
<
number_unsigned_t
>
(
val
))
...
...
@@ -5079,6 +5079,7 @@ class basic_json
throw
std
::
domain_error
(
"iterator does not fit current value"
);
}
// check if range iterators belong to the same JSON object
if
(
first
.
m_object
!=
last
.
m_object
)
{
throw
std
::
domain_error
(
"iterators do not fit"
);
...
...
@@ -7332,7 +7333,7 @@ class basic_json
@return string representation of the code point
@throw std::out_of_range if code point is >0x10ffff; example: `"code
@throw std::out_of_range if code point is >
0x10ffff; example: `"code
points above 0x10FFFF are invalid"`
@throw std::invalid_argument if the low surrogate is invalid; example:
`""missing or wrong low surrogate""`
...
...
src/json.hpp.re2c
View file @
494cc156
...
...
@@ -1461,13 +1461,13 @@ class basic_json
@since version 2.0.0
*/
template <
typename CompatibleNumberUnsignedType, typename
template <typename CompatibleNumberUnsignedType, typename
std::enable_if <
std::is_constructible<number_unsigned_t, CompatibleNumberUnsignedType>::value and
std::numeric_limits<CompatibleNumberUnsignedType>::is_integer and
!
std::numeric_limits<CompatibleNumberUnsignedType>::is_signed,
CompatibleNumberUnsignedType
>::type
= 0
>
not
std::numeric_limits<CompatibleNumberUnsignedType>::is_signed,
CompatibleNumberUnsignedType
>::type
= 0
>
basic_json(const CompatibleNumberUnsignedType val) noexcept
: m_type(value_t::number_unsigned),
m_value(static_cast<number_unsigned_t>(val))
...
...
@@ -5079,6 +5079,7 @@ class basic_json
throw std::domain_error("iterator does not fit current value");
}
// check if range iterators belong to the same JSON object
if (first.m_object != last.m_object)
{
throw std::domain_error("iterators do not fit");
...
...
@@ -7332,7 +7333,7 @@ class basic_json
@return string representation of the code point
@throw std::out_of_range if code point is >0x10ffff; example: `"code
@throw std::out_of_range if code point is >
0x10ffff; example: `"code
points above 0x10FFFF are invalid"`
@throw std::invalid_argument if the low surrogate is invalid; example:
`""missing or wrong low surrogate""`
...
...
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