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
5b0610a7
Commit
5b0610a7
authored
Jun 07, 2018
by
Benjamin Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle non-throwing exception specifications that can still throw #1280
parent
c0daf754
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
document.h
include/rapidjson/document.h
+5
-4
rapidjson.h
include/rapidjson/rapidjson.h
+13
-0
No files found.
include/rapidjson/document.h
View file @
5b0610a7
...
...
@@ -629,7 +629,7 @@ public:
kNullFlag
,
kFalseFlag
,
kTrueFlag
,
kObjectFlag
,
kArrayFlag
,
kShortStringFlag
,
kNumberAnyFlag
};
RAPIDJSON_ASSERT
(
type
>=
kNullType
&&
type
<=
kNumberType
);
RAPIDJSON_
NOEXCEPT_
ASSERT
(
type
>=
kNullType
&&
type
<=
kNumberType
);
data_
.
f
.
flags
=
defaultFlags
[
type
];
// Use ShortString to store empty string.
...
...
@@ -831,9 +831,10 @@ public:
/*! \param rhs Source of the assignment. It will become a null value after assignment.
*/
GenericValue
&
operator
=
(
GenericValue
&
rhs
)
RAPIDJSON_NOEXCEPT
{
RAPIDJSON_ASSERT
(
this
!=
&
rhs
);
this
->~
GenericValue
();
RawAssign
(
rhs
);
if
(
this
!=
&
rhs
)
{
this
->~
GenericValue
();
RawAssign
(
rhs
);
}
return
*
this
;
}
...
...
include/rapidjson/rapidjson.h
View file @
5b0610a7
...
...
@@ -591,6 +591,19 @@ RAPIDJSON_NAMESPACE_END
//!@endcond
///////////////////////////////////////////////////////////////////////////////
// RAPIDJSON_NOEXCEPT_ASSERT
#ifdef RAPIDJSON_ASSERT_THROWS
#if RAPIDJSON_HAS_CXX11_NOEXCEPT
#define RAPIDJSON_NOEXCEPT_ASSERT(x)
#else
#define RAPIDJSON_NOEXCEPT_ASSERT(x) RAPIDJSON_ASSERT(x)
#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT
#else
#define RAPIDJSON_NOEXCEPT_ASSERT(x) RAPIDJSON_ASSERT(x)
#endif // RAPIDJSON_ASSERT_THROWS
///////////////////////////////////////////////////////////////////////////////
// new/delete
...
...
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