2 #ifndef BOOST_CONTRACT_TEST_LIB_Y_HPP_
3 #define BOOST_CONTRACT_TEST_LIB_Y_HPP_
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
11 #include <boost/contract.hpp> // All headers so test ODR for entire lib.
12 #include <boost/config.hpp>
14 #ifdef BOOST_CONTRACT_TEST_LIB_Y_DYN_LINK
15 #ifdef BOOST_CONTRACT_TEST_LIB_Y_SOURCE
16 #define BOOST_CONTRACT_TEST_LIB_Y_DECLSPEC BOOST_SYMBOL_EXPORT
18 #define BOOST_CONTRACT_TEST_LIB_Y_DECLSPEC BOOST_SYMBOL_IMPORT
21 #define BOOST_CONTRACT_TEST_LIB_Y_DECLSPEC /* nothing */
24 namespace lib_y_ { // Internal namepsace.
25 void BOOST_CONTRACT_TEST_LIB_Y_DECLSPEC y_body();
29 using boost::contract::test::detail::out;
30 boost::contract::check c = boost::contract::function()
31 // Capturing [&] so out() visible in MSVC10 lambdas.
32 .precondition([&] { out("y::pre\n"); })
33 .old([&] { out("y::old\n"); })
34 .postcondition([&] { out("y::post\n"); })