unprotected_commas.hpp 951 B

123456789101112131415161718192021222324252627
  1. #ifndef BOOST_CONTRACT_TEST_DETAIL_UNPROTECTED_COMMAS_HPP_
  2. #define BOOST_CONTRACT_TEST_DETAIL_UNPROTECTED_COMMAS_HPP_
  3. // Copyright (C) 2008-2018 Lorenzo Caminiti
  4. // Distributed under the Boost Software License, Version 1.0 (see accompanying
  5. // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
  6. // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
  7. namespace boost { namespace contract { namespace test { namespace detail {
  8. // Used to test passing unprotected commas into macro parameters.
  9. template<typename T1, typename Unused2, typename Unused3>
  10. struct unprotected_commas {
  11. typedef T1 type1; // For type macro parameters.
  12. static void call() {} // For code block macro parameters.
  13. // For value macro parameters.
  14. template<typename U> static U& same(U& x) { return x; }
  15. template<typename U> static U* same(U* x) { return x; }
  16. };
  17. } } } } // namespace
  18. #endif // #include guard