]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/convert/example/default_converter_fail.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / convert / example / default_converter_fail.cpp
1 // Boost.Convert test and usage example
2 // Copyright (c) 2009-2016 Vladimir Batov.
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. See http://www.boost.org/LICENSE_1_0.txt.
5
6 #include <boost/convert.hpp>
7
8 using std::string;
9 using boost::convert;
10
11 // This is expected to fail to compile:
12 //'boost::cnv::by_default' : class has no constructors.
13
14 int
15 main(int, char const* [])
16 {
17 int i = convert<int>("123").value();
18 string s = convert<string>(123).value();
19 }
20