Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:42

0001 //  boost/detail/lightweight_test_reporter.hpp  ----------------------------------------//
0002 
0003 //  Copyright Beman Dawes 2014
0004 
0005 //  Distributed under the Boost Software License, Version 1.0.
0006 //  See http://www.boost.org/LICENSE_1_0.txt
0007 
0008 //--------------------------------------------------------------------------------------//
0009 //                                                                                      //
0010 //                         Configuration reporting cpp_main()                           //
0011 //                                                                                      //
0012 //  Displays configuration information, then returns test_main(argc, argv), which       //
0013 //  must be supplied by the user.                                                       //
0014 //                                                                                      //
0015 //  Note: cpp_main(argc, argv) is called from a try block in main(), which is           //
0016 //  supplied by <boost/detail/lightweight_main.hpp> as is a catch block that reports    //
0017 //  std::exception what().                                                              //
0018 //                                                                                      //
0019 //--------------------------------------------------------------------------------------//
0020 
0021 #include <boost/config.hpp>
0022 #include <boost/version.hpp>
0023 #include <boost/detail/lightweight_test.hpp>
0024 #include <boost/detail/lightweight_main.hpp>
0025 #include <iostream>
0026 
0027 int test_main(int argc, char* argv[]);
0028 
0029 int cpp_main(int argc, char* argv[])
0030 {
0031   std::cout << BOOST_COMPILER
0032 #ifdef __GNUC__
0033             << ", __GXX_EXPERIMENTAL_CXX0X__ "
0034 # ifdef __GXX_EXPERIMENTAL_CXX0X__
0035               "defined"
0036 # else
0037               "not defined"
0038 # endif
0039 #endif
0040             << "\n"
0041             << BOOST_STDLIB << "\n"
0042             << BOOST_PLATFORM << "\n"
0043             << "Boost version " << BOOST_VERSION / 100000 << '.'
0044             << BOOST_VERSION / 100 % 1000 << '.' << BOOST_VERSION % 100 << "\n";
0045 
0046   std::cout << "Command line: ";
0047   for (int a = 0; a < argc; ++a)
0048   {
0049     std::cout << argv[a];
0050     if (a != argc - 1)
0051       std::cout << ' ';
0052   }
0053   std::cout << std::endl;
0054 
0055   return test_main(argc, argv);
0056 }