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
c0ca05f6
Unverified
Commit
c0ca05f6
authored
Sep 11, 2018
by
Milo Yip
Committed by
GitHub
Sep 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1329 from pah/fix-noexcept
Add RAPIDJSON_NOEXCEPT_ASSERT
parents
c2aa79dc
783b819e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
document.h
include/rapidjson/document.h
+2
-5
rapidjson.h
include/rapidjson/rapidjson.h
+11
-0
No files found.
include/rapidjson/document.h
View file @
c0ca05f6
...
...
@@ -37,9 +37,6 @@ RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible lo
#ifdef __GNUC__
RAPIDJSON_DIAG_OFF
(
effc
++
)
#if __GNUC__ >= 6
RAPIDJSON_DIAG_OFF
(
terminate
)
// ignore throwing RAPIDJSON_ASSERT in RAPIDJSON_NOEXCEPT functions
#endif
#endif // __GNUC__
#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
...
...
@@ -625,7 +622,7 @@ public:
\note Default content for number is zero.
*/
explicit
GenericValue
(
Type
type
)
RAPIDJSON_NOEXCEPT
:
data_
()
{
static
const
uint16_t
defaultFlags
[
7
]
=
{
static
const
uint16_t
defaultFlags
[]
=
{
kNullFlag
,
kFalseFlag
,
kTrueFlag
,
kObjectFlag
,
kArrayFlag
,
kShortStringFlag
,
kNumberAnyFlag
};
...
...
@@ -831,7 +828,7 @@ public:
/*! \param rhs Source of the assignment. It will become a null value after assignment.
*/
GenericValue
&
operator
=
(
GenericValue
&
rhs
)
RAPIDJSON_NOEXCEPT
{
if
(
this
!=
&
rhs
)
{
if
(
RAPIDJSON_LIKELY
(
this
!=
&
rhs
)
)
{
this
->~
GenericValue
();
RawAssign
(
rhs
);
}
...
...
include/rapidjson/rapidjson.h
View file @
c0ca05f6
...
...
@@ -593,6 +593,17 @@ RAPIDJSON_NAMESPACE_END
//!@endcond
//! Assertion (in non-throwing contexts).
/*! \ingroup RAPIDJSON_CONFIG
Some functions provide a \c noexcept guarantee, if the compiler supports it.
In these cases, the \ref RAPIDJSON_ASSERT macro cannot be overridden to
throw an exception. This macro adds a separate customization point for
such cases.
Defaults to C \c assert() (as \ref RAPIDJSON_ASSERT), if \c noexcept is
supported, and to \ref RAPIDJSON_ASSERT otherwise.
*/
///////////////////////////////////////////////////////////////////////////////
// RAPIDJSON_NOEXCEPT_ASSERT
...
...
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