DAW JSON Link
Loading...
Searching...
No Matches
Classes | Namespaces
daw_writable_output_string_writer.h File Reference
#include <daw/json/impl/version.h>
#include "daw/json/concepts/daw_writable_output_fwd.h"
#include "daw/json/concepts/impl/daw_writable_output_details.h"
#include "daw/json/daw_json_switches.h"
#include <daw/cpp_20.h>
#include <daw/daw_attributes.h>
#include <daw/daw_cpp_feature_check.h>
#include <daw/daw_is_constant_evaluated.h>
#include <daw/daw_likely.h>
#include <daw/daw_string_view.h>
#include <algorithm>
#include <cstddef>
#include <string>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

class  daw::json::anonymous_namespace{daw_writable_output_string_writer.h}::string_writer
 A writable output that serializes into a std::string. The string's own output trait resizes it on every write; this keeps spare room and only grows the string when it runs out, so a write is a size check and a copy. finish( ) cuts the string to what was written. More...
 
struct  daw::json::anonymous_namespace{daw_writable_output_string_writer.h}::concepts::writable_output_trait< string_writer >
 Specialization for string_writer. More...
 

Namespaces

namespace  daw
 
namespace  daw::json
 string_writer grows its string with resize_and_overwrite, leaving the new bytes uninitialized, when the standard library has it. That skips zero filling memory that is overwritten right away, but the bytes past what was written are never initialized, which resize_and_overwrite's precondition does not allow. Define DAW_JSON_NO_LESS_SAFE_STRING_WRITER to grow with resize( ) instead
 
namespace  daw::json::anonymous_namespace{daw_writable_output_string_writer.h}
 
namespace  daw::json::anonymous_namespace{daw_writable_output_string_writer.h}::concepts