pmf_2.hpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. HEADER GUARDS INTENTIONALLY OMITTED
  6. DO NOT INCLUDE THIS HEADER DIRECTLY
  7. */
  8. template<typename Return, typename T, typename... Args>
  9. struct set_member_function_qualifiers_t<
  10. flag_map<int BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::value,
  11. false, // IsTransactionSafe
  12. false, // IsNoexcept
  13. BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> {
  14. using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
  15. BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS;
  16. };
  17. template<typename Return, typename T, typename... Args>
  18. struct set_member_function_qualifiers_t<
  19. flag_map<int BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::value,
  20. false,
  21. true,
  22. BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> {
  23. using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
  24. BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
  25. BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER;
  26. };
  27. template<typename Return, typename T, typename... Args>
  28. struct set_member_function_qualifiers_t<
  29. flag_map<int BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::value,
  30. true,
  31. false,
  32. BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> {
  33. using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
  34. BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
  35. BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER;
  36. };
  37. template<typename Return, typename T, typename... Args>
  38. struct set_member_function_qualifiers_t<
  39. flag_map<int BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS>::value,
  40. true,
  41. true,
  42. BOOST_CLBL_TRTS_CC_TAG, T, Return, Args...> {
  43. using type = Return(BOOST_CLBL_TRTS_CC T::*)(Args...)
  44. BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
  45. BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER
  46. BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER;
  47. };
  48. #define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
  49. #define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::false_type
  50. #include <boost/callable_traits/detail/unguarded/pmf_3.hpp>
  51. #undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
  52. #undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE
  53. #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
  54. #define BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE std::true_type
  55. #define BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE transaction_safe
  56. #include <boost/callable_traits/detail/unguarded/pmf_3.hpp>
  57. #undef BOOST_CLBL_TRTS_INCLUDE_TRANSACTION_SAFE
  58. #undef BOOST_CLBL_TRTS_IS_TRANSACTION_SAFE
  59. #endif