lib_a.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef BOOST_CONTRACT_TEST_LIB_A_HPP_
  2. #define BOOST_CONTRACT_TEST_LIB_A_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. #include "../detail/counter.hpp"
  8. #include <boost/contract.hpp> // All headers so test ODR for entire lib.
  9. #include <boost/config.hpp>
  10. #include <string>
  11. #ifdef BOOST_CONTRACT_TEST_LIB_A_DYN_LINK
  12. #ifdef BOOST_CONTRACT_TEST_LIB_A_SOURCE
  13. #define BOOST_CONTRACT_TEST_LIB_A_DECLSPEC BOOST_SYMBOL_EXPORT
  14. #else
  15. #define BOOST_CONTRACT_TEST_LIB_A_DECLSPEC BOOST_SYMBOL_IMPORT
  16. #endif
  17. #else
  18. #define BOOST_CONTRACT_TEST_LIB_A_DECLSPEC /* nothing */
  19. #endif
  20. #define BOOST_CONTRACT_TEST_DETAIL_OUT_DECLSPEC \
  21. BOOST_CONTRACT_TEST_LIB_A_DECLSPEC
  22. #include "../detail/out.hpp"
  23. struct BOOST_CONTRACT_TEST_LIB_A_DECLSPEC a {
  24. static void static_invariant();
  25. void invariant() const;
  26. struct x_tag;
  27. typedef boost::contract::test::detail::counter<x_tag, int> x_type;
  28. int f(x_type& x);
  29. static void disable_pre_failure();
  30. static void disable_post_failure();
  31. static void disable_entry_inv_failure();
  32. static void disable_exit_inv_failure();
  33. static void disable_inv_failure();
  34. static void disable_failure();
  35. };
  36. #ifdef BOOST_CONTRACT_HEADER_ONLY
  37. #include "lib_a_inlined.hpp"
  38. #endif
  39. #endif // #include guard