• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright David Abrahams 2003.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <boost/implicit_cast.hpp>
7 
8 using boost::implicit_cast;
9 
10 struct foo
11 {
foofoo12     explicit foo(char const*) {}
13 };
14 
main()15 int main()
16 {
17     foo x = implicit_cast<foo>("foobar");
18     (void)x;            // warning suppression.
19     return 0;
20 }
21