• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright Antony Polukhin, 2017-2019.
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 // This tests the issue from https://svn.boost.org/trac/boost/ticket/12052
8 
9 #include <iostream>
10 #include <boost/any.hpp>
11 
main()12 int main() {
13     boost::any a = 1;
14     std::cout << boost::any_cast<int>(a) << '\n';
15     a = 3.14;
16     std::cout << boost::any_cast<double>(a) << '\n';
17     a = true;
18     std::cout << std::boolalpha << boost::any_cast<bool>(a) << '\n';
19 }
20