diff options
Diffstat (limited to 'include/lib/modernjson/detail/output/output_adapters.hpp')
-rw-r--r-- | include/lib/modernjson/detail/output/output_adapters.hpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/lib/modernjson/detail/output/output_adapters.hpp b/include/lib/modernjson/detail/output/output_adapters.hpp index ff86a6e..699757d 100644 --- a/include/lib/modernjson/detail/output/output_adapters.hpp +++ b/include/lib/modernjson/detail/output/output_adapters.hpp @@ -30,7 +30,9 @@ template<typename CharType> class output_vector_adapter : public output_adapter_protocol<CharType> { public: - explicit output_vector_adapter(std::vector<CharType>& vec) : v(vec) {} + explicit output_vector_adapter(std::vector<CharType>& vec) noexcept + : v(vec) + {} void write_character(CharType c) override { @@ -51,7 +53,9 @@ template<typename CharType> class output_stream_adapter : public output_adapter_protocol<CharType> { public: - explicit output_stream_adapter(std::basic_ostream<CharType>& s) : stream(s) {} + explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept + : stream(s) + {} void write_character(CharType c) override { @@ -72,7 +76,9 @@ template<typename CharType, typename StringType = std::basic_string<CharType>> class output_string_adapter : public output_adapter_protocol<CharType> { public: - explicit output_string_adapter(StringType& s) : str(s) {} + explicit output_string_adapter(StringType& s) noexcept + : str(s) + {} void write_character(CharType c) override { @@ -109,5 +115,5 @@ class output_adapter private: output_adapter_t<CharType> oa = nullptr; }; -} -} +} // namespace detail +} // namespace nlohmann |