2004-07-26 00:32:12 +00:00
|
|
|
// Copyright David Abrahams 2003.
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See
|
|
|
|
// accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
2003-05-07 20:41:11 +00:00
|
|
|
|
|
|
|
#include <boost/implicit_cast.hpp>
|
|
|
|
|
|
|
|
using boost::implicit_cast;
|
|
|
|
|
|
|
|
struct foo
|
|
|
|
{
|
|
|
|
explicit foo(char const*) {}
|
|
|
|
};
|
|
|
|
|
2014-06-11 14:40:50 +03:00
|
|
|
int main()
|
2003-05-07 20:41:11 +00:00
|
|
|
{
|
|
|
|
foo x = implicit_cast<foo>("foobar");
|
2013-07-12 11:33:15 +00:00
|
|
|
(void)x; // warning suppression.
|
2009-11-09 12:27:54 +00:00
|
|
|
return 0;
|
2003-05-07 20:41:11 +00:00
|
|
|
}
|