Files
conversion/test/implicit_cast_fail.cpp
T

21 lines
425 B
C++
Raw Normal View History

// 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*) {}
};
int main()
2003-05-07 20:41:11 +00:00
{
foo x = implicit_cast<foo>("foobar");
(void)x; // warning suppression.
2009-11-09 12:27:54 +00:00
return 0;
2003-05-07 20:41:11 +00:00
}