Boost.Convert C++ Reference

| Home | Libraries | People | FAQ | More

## Boost.Convert C++ Reference

### Header <boost/convert.hpp>

    namespace boost {
      unspecified throw_on_failure;
      template<typename TypeOut, typename TypeIn, typename Converter>
        boost::optional< TypeOut > convert(TypeIn const &, Converter const &);
      template<typename TypeOut, typename TypeIn>
        boost::optional< TypeOut > convert(TypeIn const &);

      // Boost.Convert non-optional deployment interface.
      template<typename TypeOut, typename TypeIn, typename Converter>
        TypeOut convert(TypeIn const & value_in, Converter const & converter,
                        unspecified);
      template<typename TypeOut, typename TypeIn, typename Converter,
               typename Fallback>
        enable_if< is_convertible< Fallback, TypeOut >, TypeOut >::type
        convert(TypeIn const & value_in, Converter const & converter,
                Fallback const & fallback);
      template<typename TypeOut, typename TypeIn, typename Converter,
               typename Fallback>
        enable_if< cnv::is_fun< Fallback, TypeOut >, TypeOut >::type
        convert(TypeIn const & value_in, Converter const & converter,
                Fallback fallback);
      namespace cnv {
        template<typename Converter, typename TypeOut, typename TypeIn>
          struct reference;

        template<typename Converter, typename TypeOut>
          struct reference<Converter, TypeOut, void>;
        template<typename TypeOut, typename TypeIn, typename Converter>
          reference< Converter, TypeOut, TypeIn > apply(Converter const &);
        template<typename TypeOut, typename Converter>
          reference< Converter, TypeOut, void > apply(Converter const & cnv);
      }
    }