1 2 #ifndef BOOST_CONTRACT_TEST_LIB_A_HPP_ 3 #define BOOST_CONTRACT_TEST_LIB_A_HPP_ 4 5 // Copyright (C) 2008-2018 Lorenzo Caminiti 6 // Distributed under the Boost Software License, Version 1.0 (see accompanying 7 // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt). 8 // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html 9 10 #include "../detail/counter.hpp" 11 #include <boost/contract.hpp> // All headers so test ODR for entire lib. 12 #include <boost/config.hpp> 13 #include <string> 14 15 #ifdef BOOST_CONTRACT_TEST_LIB_A_DYN_LINK 16 #ifdef BOOST_CONTRACT_TEST_LIB_A_SOURCE 17 #define BOOST_CONTRACT_TEST_LIB_A_DECLSPEC BOOST_SYMBOL_EXPORT 18 #else 19 #define BOOST_CONTRACT_TEST_LIB_A_DECLSPEC BOOST_SYMBOL_IMPORT 20 #endif 21 #else 22 #define BOOST_CONTRACT_TEST_LIB_A_DECLSPEC /* nothing */ 23 #endif 24 25 #define BOOST_CONTRACT_TEST_DETAIL_OUT_DECLSPEC \ 26 BOOST_CONTRACT_TEST_LIB_A_DECLSPEC 27 #include "../detail/out.hpp" 28 29 struct BOOST_CONTRACT_TEST_LIB_A_DECLSPEC a { 30 static void static_invariant(); 31 void invariant() const; 32 33 struct x_tag; 34 typedef boost::contract::test::detail::counter<x_tag, int> x_type; 35 36 int f(x_type& x); 37 38 static void disable_pre_failure(); 39 static void disable_post_failure(); 40 static void disable_entry_inv_failure(); 41 static void disable_exit_inv_failure(); 42 static void disable_inv_failure(); 43 static void disable_failure(); 44 }; 45 46 #ifdef BOOST_CONTRACT_HEADER_ONLY 47 #include "lib_a_inlined.hpp" 48 #endif 49 50 #endif // #include guard 51 52