boost_no_noexcept.ipp 650 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2011 Takaya Saito
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_NO_CXX11_NOEXCEPT
  7. // TITLE: C++0x noexcept unavailable
  8. // DESCRIPTION: The compiler does not support C++0x noexcept
  9. namespace boost_no_cxx11_noexcept {
  10. void quiet_warning(bool){}
  11. int f() noexcept ;
  12. int g() noexcept( noexcept( f() ) ) ;
  13. int test()
  14. {
  15. bool b = noexcept( g() );
  16. quiet_warning(b);
  17. return 0;
  18. }
  19. }