🔨 small improvements

This commit is contained in:
Niels Lohmann 2018-10-27 18:31:03 +02:00
parent 037e93f5c0
commit 4e765596f7
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
6 changed files with 339 additions and 309 deletions

View file

@ -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
{