add_noexcept.cpp 551 B

1234567891011121314151617181920212223242526272829
  1. /*<-
  2. Copyright (c) 2016 Barrett Adair
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  5. ->*/
  6. #include <boost/callable_traits/detail/config.hpp>
  7. #ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
  8. int main(){}
  9. #else
  10. //[ add_noexcept
  11. #include <type_traits>
  12. #include <boost/callable_traits/add_noexcept.hpp>
  13. using boost::callable_traits::add_noexcept_t;
  14. static_assert(std::is_same<
  15. add_noexcept_t<int()>,
  16. int() noexcept
  17. >{}, "");
  18. int main() {}
  19. //]
  20. #endif