initialization_test.cpp 721 B

12345678910111213141516171819202122232425262728
  1. // initialization_test.cpp -------------------------------------------------//
  2. // Copyright Christoper Kohlhoff 2007
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See library home page at http://www.boost.org/libs/system
  6. // This test verifiies that the error_category vtable does not suffer from
  7. // order-of-initialization problems.
  8. #include <boost/system/error_code.hpp>
  9. #include <boost/core/lightweight_test.hpp>
  10. struct foo
  11. {
  12. foo()
  13. {
  14. boost::system::error_code ec;
  15. BOOST_TEST_NE( ec, boost::system::errc::permission_denied );
  16. }
  17. } f;
  18. int main()
  19. {
  20. return boost::report_errors();
  21. }