Sophie

Sophie

distrib > Mageia > 6 > i586 > by-pkgid > 8bc6759a6f32712e5bc0cdfb80b23784 > files > 566

boost-examples-1.60.0-6.mga6.noarch.rpm

// Boost.Convert test and usage example
// Copyright (c) 2009-2014 Vladimir Batov.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. See http://www.boost.org/LICENSE_1_0.txt.

#include <boost/convert.hpp>

using std::string;
using boost::convert;

// This is expected to fail to compile:
//'boost::cnv::by_default' : class has no constructors.

int
main(int, char const* [])
{
    int    i = convert<int>("123").value();
    string s = convert<string>(123).value();
}