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
3679c280
Commit
3679c280
authored
Nov 23, 2014
by
Milo Yip
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into issue120floatprecision_customstrtod
parents
57b91300
c8bed6b8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
43 deletions
+73
-43
document.h
include/rapidjson/document.h
+2
-0
diyfp.h
include/rapidjson/internal/diyfp.h
+1
-1
writer.h
include/rapidjson/writer.h
+3
-1
readme.md
readme.md
+1
-1
documenttest.cpp
test/unittest/documenttest.cpp
+31
-19
valuetest.cpp
test/unittest/valuetest.cpp
+35
-21
No files found.
include/rapidjson/document.h
View file @
3679c280
...
...
@@ -1862,6 +1862,8 @@ private:
}
private
:
//! Prohibit copying
GenericDocument
(
const
GenericDocument
&
);
//! Prohibit assignment
GenericDocument
&
operator
=
(
const
GenericDocument
&
);
...
...
include/rapidjson/internal/diyfp.h
View file @
3679c280
...
...
@@ -43,7 +43,7 @@ RAPIDJSON_DIAG_OFF(effc++)
struct
DiyFp
{
DiyFp
()
{}
DiyFp
(
uint64_t
f
,
int
e
)
:
f
(
f
),
e
(
e
)
{}
DiyFp
(
uint64_t
f
p
,
int
exp
)
:
f
(
fp
),
e
(
exp
)
{}
explicit
DiyFp
(
double
d
)
{
union
{
...
...
include/rapidjson/writer.h
View file @
3679c280
...
...
@@ -59,12 +59,14 @@ public:
//! Constructor
/*! \param os Output stream.
\param
a
llocator User supplied allocator. If it is null, it will create a private one.
\param
stackA
llocator User supplied allocator. If it is null, it will create a private one.
\param levelDepth Initial capacity of stack.
*/
explicit
Writer
(
OutputStream
&
os
,
StackAllocator
*
stackAllocator
=
0
,
size_t
levelDepth
=
kDefaultLevelDepth
)
:
os_
(
&
os
),
level_stack_
(
stackAllocator
,
levelDepth
*
sizeof
(
Level
)),
hasRoot_
(
false
)
{}
explicit
Writer
(
StackAllocator
*
allocator
=
0
,
size_t
levelDepth
=
kDefaultLevelDepth
)
:
os_
(
0
),
level_stack_
(
allocator
,
levelDepth
*
sizeof
(
Level
)),
hasRoot_
(
false
)
{}
...
...
readme.md
View file @
3679c280
...
...
@@ -97,4 +97,4 @@ The following diagram shows the process.
![
simpledom
](
doc/diagram/simpledom.png
)
More
[
examples
](
example/
)
are available.
More
[
examples
](
https://github.com/miloyip/rapidjson/tree/master/example
)
are available.
test/unittest/documenttest.cpp
View file @
3679c280
...
...
@@ -232,26 +232,38 @@ TEST(Document, UTF16_Document) {
#include <type_traits>
TEST
(
Document
,
Traits
)
{
static_assert
(
std
::
is_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_copy_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_move_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_default_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_assignable
<
Document
,
Document
>::
value
,
""
);
static_assert
(
std
::
is_constructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_constructible
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_default_constructible
<
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_constructible
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_assignable
<
Document
,
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_move_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_assignable
<
Document
,
Document
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_assignable
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_destructible
<
Document
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_destructible
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_assignable
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_assignable
<
Document
,
Document
>::
value
,
""
);
#endif
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_assignable
<
Document
>::
value
,
""
);
#endif
static_assert
(
std
::
is_destructible
<
Document
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_destructible
<
Document
>::
value
,
""
);
#endif
}
template
<
typename
Allocator
>
...
...
test/unittest/valuetest.cpp
View file @
3679c280
...
...
@@ -43,27 +43,41 @@ TEST(Value, DefaultConstructor) {
#include <type_traits>
TEST
(
Value
,
Traits
)
{
typedef
GenericValue
<
UTF8
<>
,
CrtAllocator
>
Value
;
static_assert
(
std
::
is_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_copy_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_move_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_default_constructible
<
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_assignable
<
Value
,
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_copy_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_move_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_assignable
<
Value
,
Value
>::
value
,
""
);
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_move_assignable
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_destructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_destructible
<
Value
>::
value
,
""
);
typedef
GenericValue
<
UTF8
<>
,
CrtAllocator
>
Value
;
static_assert
(
std
::
is_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_default_constructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_constructible
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_constructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_constructible
<
Value
>::
value
,
""
);
static_assert
(
std
::
is_nothrow_default_constructible
<
Value
>::
value
,
""
);
#endif
static_assert
(
!
std
::
is_nothrow_copy_constructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_constructible
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_assignable
<
Value
,
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
!
std
::
is_copy_assignable
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_move_assignable
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_assignable
<
Value
,
Value
>::
value
,
""
);
#endif
static_assert
(
!
std
::
is_nothrow_copy_assignable
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_move_assignable
<
Value
>::
value
,
""
);
#endif
static_assert
(
std
::
is_destructible
<
Value
>::
value
,
""
);
#ifndef _MSC_VER
static_assert
(
std
::
is_nothrow_destructible
<
Value
>::
value
,
""
);
#endif
}
TEST
(
Value
,
MoveConstructor
)
{
...
...
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