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
3003b841
Commit
3003b841
authored
Jul 20, 2015
by
Milo Yip
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #391 from pah/fix/no-doc2value-move
Prohibit C++11 move from Document to Value
parents
9b281070
fec9e8a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
document.h
include/rapidjson/document.h
+14
-1
No files found.
include/rapidjson/document.h
View file @
3003b841
...
@@ -69,6 +69,9 @@ RAPIDJSON_NAMESPACE_BEGIN
...
@@ -69,6 +69,9 @@ RAPIDJSON_NAMESPACE_BEGIN
template
<
typename
Encoding
,
typename
Allocator
>
template
<
typename
Encoding
,
typename
Allocator
>
class
GenericValue
;
class
GenericValue
;
template
<
typename
Encoding
,
typename
Allocator
,
typename
StackAllocator
>
class
GenericDocument
;
//! Name-value pair in a JSON object value.
//! Name-value pair in a JSON object value.
/*!
/*!
This class was internal to GenericValue. It used to be a inner struct.
This class was internal to GenericValue. It used to be a inner struct.
...
@@ -446,6 +449,16 @@ private:
...
@@ -446,6 +449,16 @@ private:
//! Copy constructor is not permitted.
//! Copy constructor is not permitted.
GenericValue
(
const
GenericValue
&
rhs
);
GenericValue
(
const
GenericValue
&
rhs
);
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
//! Moving from a GenericDocument is not permitted.
template
<
typename
StackAllocator
>
GenericValue
(
GenericDocument
<
Encoding
,
Allocator
,
StackAllocator
>&&
rhs
);
//! Move assignment from a GenericDocument is not permitted.
template
<
typename
StackAllocator
>
GenericValue
&
operator
=
(
GenericDocument
<
Encoding
,
Allocator
,
StackAllocator
>&&
rhs
);
#endif
public
:
public
:
//! Constructor with JSON value type.
//! Constructor with JSON value type.
...
@@ -1792,7 +1805,7 @@ public:
...
@@ -1792,7 +1805,7 @@ public:
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
//! Move constructor in C++11
//! Move constructor in C++11
GenericDocument
(
GenericDocument
&&
rhs
)
RAPIDJSON_NOEXCEPT
GenericDocument
(
GenericDocument
&&
rhs
)
RAPIDJSON_NOEXCEPT
:
ValueType
(
std
::
move
(
rhs
)),
:
ValueType
(
std
::
forward
<
ValueType
>
(
rhs
)),
// explicit cast to avoid prohibited move from Document
allocator_
(
rhs
.
allocator_
),
allocator_
(
rhs
.
allocator_
),
ownAllocator_
(
rhs
.
ownAllocator_
),
ownAllocator_
(
rhs
.
ownAllocator_
),
stack_
(
std
::
move
(
rhs
.
stack_
)),
stack_
(
std
::
move
(
rhs
.
stack_
)),
...
...
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