Sha256: 598f894adb85548a902351747a474e7130c3734fdcdc091531b7f1be80b6fa83

Contents?: true

Size: 717 Bytes

Versions: 7

Compression:

Stored size: 717 Bytes

Contents

// Copyright (c) 2017-2022 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/json/

#ifndef TAO_JSON_CBOR_EVENTS_TO_STRING_HPP
#define TAO_JSON_CBOR_EVENTS_TO_STRING_HPP

#include <sstream>
#include <string>
#include <utility>

#include "to_stream.hpp"

namespace tao::json::cbor::events
{
   struct to_string
      : to_stream
   {
      std::ostringstream oss;

      to_string()
         : to_stream( oss )
      {}

      [[nodiscard]] std::string value() const&
      {
         return oss.str();
      }

      [[nodiscard]] std::string value() &&
      {
         return std::move( oss ).str();
      }
   };

}  // namespace tao::json::cbor::events

#endif

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
couchbase-3.4.5 ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp
couchbase-3.4.4 ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp
couchbase-3.4.3 ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp
couchbase-3.4.2 ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp
couchbase-3.4.1 ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp
couchbase-3.4.0 ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp
couchbase-3.3.0 ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp