Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct charconv

boost::cnv::charconv — std::to/from_chars-based extended converter

Synopsis

// In header: <boost/convert/charconv.hpp>


struct charconv : public boost::cnv::cnvbase< boost::cnv::charconv > {
  // types
  typedef boost::cnv::charconv             this_type;
  typedef boost::cnv::cnvbase< this_type > base_type;

  // private member functions
  template<typename in_type> 
    cnv::range< char * > to_str(in_type, char *) const;
  template<typename string_type, typename out_type> 
    void str_to(cnv::range< string_type >, optional< out_type > &) const;
  std::chars_format chars_format() const;
};

Description

The converter offers good overall performance and moderate formatting facilities.

charconv private member functions

  1. template<typename in_type> 
      cnv::range< char * > to_str(in_type value_in, char * buf) const;
  2. template<typename string_type, typename out_type> 
      void str_to(cnv::range< string_type > range, 
                  optional< out_type > & result_out) const;
  3. std::chars_format chars_format() const;

PrevUpHomeNext