noop.hpp 717 B

12345678910111213141516171819
  1. #ifndef BOOST_CONTRACT_DETAIL_NOOP_HPP_
  2. #define BOOST_CONTRACT_DETAIL_NOOP_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. // Following must be expressions, not statements (as used with if.., etc.).
  8. #define BOOST_CONTRACT_DETAIL_NOOP ((void)0)
  9. // Following always compiles but never evaluates cond (so check correct syntax).
  10. #define BOOST_CONTRACT_DETAIL_NOEVAL(cond) \
  11. (true || (cond) ? BOOST_CONTRACT_DETAIL_NOOP : BOOST_CONTRACT_DETAIL_NOOP)
  12. #endif // #include guard