remove_transaction_safe.cpp 704 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_TRANSACTION_SAFE
  8. int main(){}
  9. #else
  10. //[ remove_transaction_safe
  11. #include <type_traits>
  12. #include <boost/callable_traits/remove_transaction_safe.hpp>
  13. namespace ct = boost::callable_traits;
  14. using ts = int() transaction_safe;
  15. using not_ts = int();
  16. using ts_removed = ct::remove_transaction_safe_t<ts>;
  17. static_assert(std::is_same<not_ts, ts_removed>{}, "");
  18. int main() {}
  19. //]
  20. #endif //#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE