MySQL 9.6.0
Source Code Documentation
mysql::strconv::Streamable< String_t > Class Template Reference

Wrapper around an std::optional<std::string> object returned from encode, intended to be passed to operator<<, allowing it to implement ostream-idiomatic error handling. More...

#include <encode.h>

Public Types

using Opt_string = std::optional< String_t >
 

Public Member Functions

 Streamable (Opt_string &&other)
 Construct a new Streamable from an expiring optional string. More...
 
const Opt_stringopt_string_ref () const
 Return reference to the optional string stored in this object. More...
 

Private Attributes

Opt_string m_opt_string
 Stored optional string object. More...
 

Detailed Description

template<class String_t = std::string>
class mysql::strconv::Streamable< String_t >

Wrapper around an std::optional<std::string> object returned from encode, intended to be passed to operator<<, allowing it to implement ostream-idiomatic error handling.

See also
encode_to_streamable

Member Typedef Documentation

◆ Opt_string

template<class String_t = std::string>
using mysql::strconv::Streamable< String_t >::Opt_string = std::optional<String_t>

Constructor & Destructor Documentation

◆ Streamable()

template<class String_t = std::string>
mysql::strconv::Streamable< String_t >::Streamable ( Opt_string &&  other)
inlineexplicit

Construct a new Streamable from an expiring optional string.

Member Function Documentation

◆ opt_string_ref()

template<class String_t = std::string>
const Opt_string & mysql::strconv::Streamable< String_t >::opt_string_ref ( ) const
inline

Return reference to the optional string stored in this object.

Member Data Documentation

◆ m_opt_string

template<class String_t = std::string>
Opt_string mysql::strconv::Streamable< String_t >::m_opt_string
private

Stored optional string object.


The documentation for this class was generated from the following file: