Skip to content

Commit

Permalink
Move constructor support for PrettyWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
CreoValis committed Sep 19, 2016
1 parent ccd13e3 commit c915e91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/rapidjson/prettywriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#ifdef __GNUC__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
RAPIDJSON_DIAG_OFF(c++98-compat)
#endif

RAPIDJSON_NAMESPACE_BEGIN
Expand Down Expand Up @@ -57,6 +58,11 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
explicit PrettyWriter(StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) :
Base(allocator, levelDepth), indentChar_(' '), indentCharCount_(4) {}

#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
explicit PrettyWriter(PrettyWriter&& rhs) :
Base(std::forward(rhs)), indentChar_(rhs.indentChar_), indentCharCount_(rhs.indentCharCount_), formatOptions_(rhs.formatOptions_) {}
#endif

//! Set custom indentation.
/*! \param indentChar Character for indentation. Must be whitespace character (' ', '\\t', '\\n', '\\r').
\param indentCharCount Number of indent characters for each indentation level.
Expand Down

0 comments on commit c915e91

Please sign in to comment.