Sha256: f7922b6abebd1c2845539301dce3d2eaf9993b2ba885f1c79ec1785bfd2581f9

Contents?: true

Size: 624 Bytes

Versions: 7

Compression:

Stored size: 624 Bytes

Contents

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

#ifndef TAO_JSON_TO_STRING_HPP
#define TAO_JSON_TO_STRING_HPP

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

#include "to_stream.hpp"

namespace tao::json
{
   template< template< typename... > class... Transformers, typename... Ts >
   [[nodiscard]] std::string to_string( Ts&&... ts )
   {
      std::ostringstream oss;
      json::to_stream< Transformers... >( oss, std::forward< Ts >( ts )... );
      return std::move( oss ).str();
   }

}  // namespace tao::json

#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/to_string.hpp
couchbase-3.4.4 ext/couchbase/third_party/json/include/tao/json/to_string.hpp
couchbase-3.4.3 ext/couchbase/third_party/json/include/tao/json/to_string.hpp
couchbase-3.4.2 ext/couchbase/third_party/json/include/tao/json/to_string.hpp
couchbase-3.4.1 ext/couchbase/third_party/json/include/tao/json/to_string.hpp
couchbase-3.4.0 ext/couchbase/third_party/json/include/tao/json/to_string.hpp
couchbase-3.3.0 ext/couchbase/third_party/json/include/tao/json/to_string.hpp