Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
4620fa60
Commit
4620fa60
authored
Feb 21, 2016
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix VS2010 compilation errors
parent
e1617b47
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
document.h
include/rapidjson/document.h
+1
-1
istreamwrapper.h
include/rapidjson/istreamwrapper.h
+6
-1
rapidjson.h
include/rapidjson/rapidjson.h
+1
-1
valuetest.cpp
test/unittest/valuetest.cpp
+2
-2
No files found.
include/rapidjson/document.h
View file @
4620fa60
...
@@ -2254,7 +2254,7 @@ public:
...
@@ -2254,7 +2254,7 @@ public:
template
<
unsigned
parseFlags
>
template
<
unsigned
parseFlags
>
GenericDocument
&
Parse
(
const
std
::
basic_string
<
Ch
>&
str
)
{
GenericDocument
&
Parse
(
const
std
::
basic_string
<
Ch
>&
str
)
{
return
Parse
<
parseFlags
,
Encoding
>
(
str
);
return
Parse
<
parseFlags
,
Encoding
>
(
str
.
c_str
()
);
}
}
GenericDocument
&
Parse
(
const
std
::
basic_string
<
Ch
>&
str
)
{
GenericDocument
&
Parse
(
const
std
::
basic_string
<
Ch
>&
str
)
{
...
...
include/rapidjson/istreamwrapper.h
View file @
4620fa60
...
@@ -20,6 +20,11 @@ RAPIDJSON_DIAG_PUSH
...
@@ -20,6 +20,11 @@ RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
padded
)
RAPIDJSON_DIAG_OFF
(
padded
)
#endif
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4351
)
// new behavior: elements of array 'array' will be default initialized
#endif
RAPIDJSON_NAMESPACE_BEGIN
RAPIDJSON_NAMESPACE_BEGIN
//! Wrapper of \c std::basic_istream into RapidJSON's Stream concept.
//! Wrapper of \c std::basic_istream into RapidJSON's Stream concept.
...
@@ -98,7 +103,7 @@ private:
...
@@ -98,7 +103,7 @@ private:
typedef
BasicIStreamWrapper
<
std
::
istream
>
IStreamWrapper
;
typedef
BasicIStreamWrapper
<
std
::
istream
>
IStreamWrapper
;
typedef
BasicIStreamWrapper
<
std
::
wistream
>
WIStreamWrapper
;
typedef
BasicIStreamWrapper
<
std
::
wistream
>
WIStreamWrapper
;
#if
def __clang__
#if
defined(__clang__) || defined(_MSC_VER)
RAPIDJSON_DIAG_POP
RAPIDJSON_DIAG_POP
#endif
#endif
...
...
include/rapidjson/rapidjson.h
View file @
4620fa60
...
@@ -565,7 +565,7 @@ RAPIDJSON_NAMESPACE_END
...
@@ -565,7 +565,7 @@ RAPIDJSON_NAMESPACE_END
#if defined(__clang__)
#if defined(__clang__)
#define RAPIDJSON_HAS_CXX11_RANGE_FOR __has_feature(cxx_range_for)
#define RAPIDJSON_HAS_CXX11_RANGE_FOR __has_feature(cxx_range_for)
#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
(
defined
(
_MSC_VER
)
&&
_MSC_VER
>=
1
6
00
)
(
defined
(
_MSC_VER
)
&&
_MSC_VER
>=
1
7
00
)
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
#else
#else
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 0
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 0
...
...
test/unittest/valuetest.cpp
View file @
4620fa60
...
@@ -666,10 +666,10 @@ TEST(Value, IsLosslessDouble) {
...
@@ -666,10 +666,10 @@ TEST(Value, IsLosslessDouble) {
EXPECT_TRUE
(
Value
(
12.34
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
12.34
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
-
123
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
-
123
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
2147483648u
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
2147483648u
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
static_cast
<
int64_t
>
(
-
RAPIDJSON_UINT64_C2
(
0x40000000
,
0x00000000
))).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
-
static_cast
<
int64_t
>
(
RAPIDJSON_UINT64_C2
(
0x40000000
,
0x00000000
))).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
RAPIDJSON_UINT64_C2
(
0xA0000000
,
0x00000000
)).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
RAPIDJSON_UINT64_C2
(
0xA0000000
,
0x00000000
)).
IsLosslessDouble
());
EXPECT_FALSE
(
Value
(
static_cast
<
int64_t
>
(
-
RAPIDJSON_UINT64_C2
(
0x7FFFFFFF
,
0xFFFFFFFF
))).
IsLosslessDouble
());
EXPECT_FALSE
(
Value
(
-
static_cast
<
int64_t
>
(
RAPIDJSON_UINT64_C2
(
0x7FFFFFFF
,
0xFFFFFFFF
))).
IsLosslessDouble
());
EXPECT_FALSE
(
Value
(
RAPIDJSON_UINT64_C2
(
0xFFFFFFFF
,
0xFFFFFFFF
)).
IsLosslessDouble
());
EXPECT_FALSE
(
Value
(
RAPIDJSON_UINT64_C2
(
0xFFFFFFFF
,
0xFFFFFFFF
)).
IsLosslessDouble
());
}
}
...
...
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