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 printf

boost::cnv::printf

Synopsis

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


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

  // public 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;

  // private member functions
  template<typename Type> int pos() const;
  char const * pformat(int) const;
  char const * format(int) const;
};

Description

printf public 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;

printf private member functions

  1. template<typename Type> int pos() const;
  2. char const * pformat(int pos) const;
  3. char const * format(int pos) const;

PrevUpHomeNext