diff --git a/include/boost/contract/aux_/check/pre_post.hpp b/include/boost/contract/aux_/check/pre_post.hpp index d81fe20..51d5389 100644 --- a/include/boost/contract/aux_/check/pre_post.hpp +++ b/include/boost/contract/aux_/check/pre_post.hpp @@ -2,18 +2,31 @@ #ifndef BOOST_CONTRACT_AUX_CHECK_PRE_POST_HPP_ #define BOOST_CONTRACT_AUX_CHECK_PRE_POST_HPP_ -#include - -// TODO: Consider moving this to an aux_/check/ dir and namespace. +#include namespace boost { namespace contract { namespace aux { namespace check { -// TODO: check_pre/post should probably just be made protected members of -// class containing pre_/post_ so those can be made private data members. -class pre_post : public boost::contract::type { +class pre_post { +public: + template + void set_pre(Pre const& pre) { pre_ = pre; pre_available(); } + + template + void set_post(Post const& post) { post_ = post; post_available(); } + protected: + pre_post() {} + virtual ~pre_post() {} + void check_pre() { if(pre_) pre_(); } void check_post() { if(post_) post_(); } + + virtual void pre_available() {} + virtual void post_available() {} + +private: + boost::function pre_; + boost::function post_; }; } } } } // namespace diff --git a/include/boost/contract/aux_/check/subcontracted_pre_post_inv.hpp b/include/boost/contract/aux_/check/subcontracted_pre_post_inv.hpp index bfa74f5..c032e3c 100644 --- a/include/boost/contract/aux_/check/subcontracted_pre_post_inv.hpp +++ b/include/boost/contract/aux_/check/subcontracted_pre_post_inv.hpp @@ -58,23 +58,23 @@ template< boost::add_pointer >::type base_ptrs; -#if !BOOST_CONTRACT_CONFIG_PERMISSIVE - // TODO: Fix those. - //BOOST_STATIC_ASSERT_MSG(!boost::contract::aux::has_mutable_invariant< - // Class>::value, "class invariant function must be const"); - //BOOST_STATIC_ASSERT_MSG( - // (!boost::mpl::and_< - // boost::contract::aux::has_bases, - // boost::mpl::or_< - // boost::is_same, - // boost::is_same - // > - // >::value), - // "must specify introspection type, function type, and function " - // "arguments for member contract of class with bases" - //); - // TODO: static_assert(Func == none || class::type == Class) -#endif +// TODO: Fix !CONFIG_PERMISSIVE static assertions. +//#if !BOOST_CONTRACT_CONFIG_PERMISSIVE +// BOOST_STATIC_ASSERT_MSG(!boost::contract::aux::has_mutable_invariant< +// Class>::value, "class invariant function must be const"); +// BOOST_STATIC_ASSERT_MSG( +// (!boost::mpl::and_< +// boost::contract::aux::has_bases, +// boost::mpl::or_< +// boost::is_same, +// boost::is_same +// > +// >::value), +// "must specify introspection type, function type, and function " +// "arguments for member contract of class with bases" +// ); +// // TODO: static_assert(Func == none || class::type == Class) +//#endif public: explicit subcontracted_pre_post_inv(Class* const obj, Arg0 arg0) : @@ -87,14 +87,10 @@ public: } protected: - void check_subcontracted_inv(bool const static_inv_only = false) { + void check_subcontracted_inv() { boost::mpl::for_each(check_base(*this, - static_inv_only ? - boost::contract::virtual_body::check_static_inv_only - : - boost::contract::virtual_body::check_inv_only - )); - this->check_inv(static_inv_only); + boost::contract::virtual_body::check_inv_only)); + this->check_inv(); } void check_subcontracted_pre() { diff --git a/include/boost/contract/aux_/function/constructor.hpp b/include/boost/contract/aux_/function/constructor.hpp index 3cc41de..cce1187 100644 --- a/include/boost/contract/aux_/function/constructor.hpp +++ b/include/boost/contract/aux_/function/constructor.hpp @@ -22,10 +22,10 @@ private: void entry() { this->check_inv(/* static_inv_only = */ true); } // Ctor pre checked by constructor_precondition at start of init list. - void pre_available() { BOOST_CONTRACT_AUX_DEBUG(false); } + void pre_available() /* override */ { BOOST_CONTRACT_AUX_DEBUG(false); } // Ctor post always checked later, at exit (see below). - void post_available() {} + void post_available() /* override */ {} // If ctor body threw, only check static inv, otherwise obj constructed so // check also non-static inv and post (subcontracting implemented diff --git a/include/boost/contract/aux_/function/destructor.hpp b/include/boost/contract/aux_/function/destructor.hpp index 12a4426..6a07c17 100644 --- a/include/boost/contract/aux_/function/destructor.hpp +++ b/include/boost/contract/aux_/function/destructor.hpp @@ -25,12 +25,12 @@ private: void entry() { this->check_inv(); } // Dtor cannot have pre because it has no parameters. - void pre_available() { BOOST_CONTRACT_AUX_DEBUG(false); } + void pre_available() /* override */ { BOOST_CONTRACT_AUX_DEBUG(false); } // Ctor post always checked after body, at exit (see below). // NOTE: Even if there is no obj after dtor body, this library allows for // dtor post (e.g., to check static members for an instance counter class). - void post_available() {} + void post_available() /* override */ {} // If dtor body threw, obj still exists so check subcontracted static and // non-static inv (but no post because of throw), otherwise obj destructed diff --git a/include/boost/contract/aux_/function/free_function.hpp b/include/boost/contract/aux_/function/free_function.hpp index ee8cd6a..91ff88a 100644 --- a/include/boost/contract/aux_/function/free_function.hpp +++ b/include/boost/contract/aux_/function/free_function.hpp @@ -18,10 +18,10 @@ private: void entry() {} // Check pre (as soon as related functor set). - void pre_available() { check_pre(); } + void pre_available() /* override */ { check_pre(); } // Post always checked after body, at exit (see below). - void post_available() {} + void post_available() /* override */ {} // If body did not throw, check post (not a public member so no inv to // check, nor subcontracting). diff --git a/include/boost/contract/aux_/function/public_member.hpp b/include/boost/contract/aux_/function/public_member.hpp index a400e3e..ae6485f 100644 --- a/include/boost/contract/aux_/function/public_member.hpp +++ b/include/boost/contract/aux_/function/public_member.hpp @@ -78,23 +78,16 @@ public: private: // Check static and non-static subcontracted inv. void entry() { - if( - virt_.action == boost::contract::virtual_body::user_call || - virt_.action == boost::contract::virtual_body::check_inv_only || - // TODO: Do I really need the check_static_inv_only action or - // static-inv-check-only applies only to check_inv() and not - // to check_subcontracted_inv()? - virt_.action == boost::contract::virtual_body::check_static_inv_only - ) { - this->check_subcontracted_inv(/* static_inv_only = */ virt_.action - == boost::contract::virtual_body::check_static_inv_only); + if(virt_.action == boost::contract::virtual_body::user_call || + virt_.action == boost::contract::virtual_body::check_inv_only) { + this->check_subcontracted_inv(); if(virt_.action != boost::contract::virtual_body::user_call) throw boost::contract::aux::no_error(); } // Else (check only pre, post, etc.) do nothing. } // Check subcontracted pre (as soon as related functor set). - void pre_available() { + void pre_available() /* override */ { if(virt_.action == boost::contract::virtual_body::user_call || virt_.action == boost::contract::virtual_body::check_pre_only) { this->check_subcontracted_pre(); @@ -104,7 +97,7 @@ private: } // Check post here only if check-post-only mode (otherwise check at exit). - void post_available() { + void post_available() /* override */ { if(virt_.action == boost::contract::virtual_body::check_post_only) { this->check_subcontracted_post(); throw boost::contract::aux::no_error(); diff --git a/include/boost/contract/aux_/function/public_static_member.hpp b/include/boost/contract/aux_/function/public_static_member.hpp index 756d725..5b4e1ba 100644 --- a/include/boost/contract/aux_/function/public_static_member.hpp +++ b/include/boost/contract/aux_/function/public_static_member.hpp @@ -26,10 +26,10 @@ private: void entry() { this->check_inv(/* static_inv_only = */ true); } // Check pre (as soon as related functor set). - void pre_available() { this->check_pre(); } + void pre_available() /* override */ { this->check_pre(); } // Post always checked after body, at exit (see below). - void post_available() {} + void post_available() /* override */ {} // Static so no object and only static inv checked, plus check post but // only if body did not throw. diff --git a/include/boost/contract/aux_/set/nothing.hpp b/include/boost/contract/aux_/set/nothing.hpp new file mode 100644 index 0000000..b197278 --- /dev/null +++ b/include/boost/contract/aux_/set/nothing.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_CONTRACT_AUX_SET_NOTHING_HPP_ +#define BOOST_CONTRACT_AUX_SET_NOTHING_HPP_ + +#include +#include + +namespace boost { + namespace contract { + class type; + } +} + +namespace boost { namespace contract { namespace aux { namespace set { + +class nothing { +public: + explicit nothing(boost::shared_ptr + const contract) : contract_(contract) {} + + // Allow to set nothing (neither pre, nor post). + +private: + friend class boost::contract::type; + boost::shared_ptr contract_; +}; + +} } } } // namespace + +#endif // #include guard + diff --git a/include/boost/contract/aux_/set/post_only.hpp b/include/boost/contract/aux_/set/post_only.hpp new file mode 100644 index 0000000..6187e7a --- /dev/null +++ b/include/boost/contract/aux_/set/post_only.hpp @@ -0,0 +1,36 @@ + +#ifndef BOOST_CONTRACT_AUX_SET_POST_ONLY_HPP_ +#define BOOST_CONTRACT_AUX_SET_POST_ONLY_HPP_ + +#include +#include +#include + +namespace boost { + namespace contract { + class type; + } +} + +namespace boost { namespace contract { namespace aux { namespace set { + +class post_only { +public: + explicit post_only(boost::shared_ptr + const contract) : contract_(contract) {} + + template + boost::contract::aux::set::nothing postcondition(Pre const& post) { + contract_->set_post(post); + return boost::contract::aux::set::nothing(contract_); + } + +private: + friend class boost::contract::type; + boost::shared_ptr contract_; +}; + +} } } } // namespace + +#endif // #include guard + diff --git a/include/boost/contract/aux_/set/pre_only.hpp b/include/boost/contract/aux_/set/pre_only.hpp new file mode 100644 index 0000000..2a2b0c5 --- /dev/null +++ b/include/boost/contract/aux_/set/pre_only.hpp @@ -0,0 +1,36 @@ + +#ifndef BOOST_CONTRACT_AUX_SET_PRE_ONLY_HPP_ +#define BOOST_CONTRACT_AUX_SET_PRE_ONLY_HPP_ + +#include +#include +#include + +namespace boost { + namespace contract { + class type; + } +} + +namespace boost { namespace contract { namespace aux { namespace set { + +class pre_only { +public: + explicit pre_only(boost::shared_ptr + const contract) : contract_(contract) {} + + template + boost::contract::aux::set::nothing precondition(Pre const& pre) { + contract_->set_pre(pre); + return boost::contract::aux::set::nothing(contract_); + } + +private: + friend class boost::contract::type; + boost::shared_ptr contract_; +}; + +} } } } // namespace + +#endif // #include guard + diff --git a/include/boost/contract/aux_/set/pre_post.hpp b/include/boost/contract/aux_/set/pre_post.hpp new file mode 100644 index 0000000..c058cae --- /dev/null +++ b/include/boost/contract/aux_/set/pre_post.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_CONTRACT_AUX_SET_PRE_POST_HPP_ +#define BOOST_CONTRACT_AUX_SET_PRE_POST_HPP_ + +#include +#include +#include +#include + +namespace boost { + namespace contract { + class type; + } +} + +namespace boost { namespace contract { namespace aux { namespace set { + +class pre_post { +public: + explicit pre_post(boost::shared_ptr + const contract) : contract_(contract) {} + + template + boost::contract::aux::set::post_only precondition(Pre const& pre) { + contract_->set_pre(pre); + return boost::contract::aux::set::post_only(contract_); + } + + template + boost::contract::aux::set::pre_only postcondition(Post const& post) { + contract_->set_post(post); + return boost::contract::aux::set::pre_only(contract_); + } + +private: + friend class boost::contract::type; + boost::shared_ptr contract_; +}; + +} } } } // namespace + +#endif // #include guard + diff --git a/include/boost/contract/constructor.hpp b/include/boost/contract/constructor.hpp index 91608a6..d056725 100644 --- a/include/boost/contract/constructor.hpp +++ b/include/boost/contract/constructor.hpp @@ -2,16 +2,16 @@ #ifndef BOOST_CONTRACT_CONSTRUCTOR_HPP_ #define BOOST_CONTRACT_CONSTRUCTOR_HPP_ -#include #include +#include #include namespace boost { namespace contract { template -boost::contract::type constructor(Class* const object) { - return boost::contract::type(boost::make_shared >(object)); +boost::contract::aux::set::post_only constructor(Class* const object) { + return boost::contract::aux::set::post_only(boost::make_shared< + boost::contract::aux::function::constructor >(object)); } // Uses Class tparam to avoid multiple inheritance from same type. diff --git a/include/boost/contract/destructor.hpp b/include/boost/contract/destructor.hpp index f26f4dc..6bc7965 100644 --- a/include/boost/contract/destructor.hpp +++ b/include/boost/contract/destructor.hpp @@ -2,16 +2,16 @@ #ifndef BOOST_CONTRACT_DESTRUCTOR_HPP_ #define BOOST_CONTRACT_DESTRUCTOR_HPP_ -#include #include +#include #include namespace boost { namespace contract { template -boost::contract::type destructor(Class* const object) { - return boost::contract::type(boost::make_shared >(object)); +boost::contract::aux::set::post_only destructor(Class* const object) { + return boost::contract::aux::set::post_only(boost::make_shared< + boost::contract::aux::function::destructor >(object)); } } } // namespace diff --git a/include/boost/contract/free_function.hpp b/include/boost/contract/free_function.hpp index 07c866a..09935cd 100644 --- a/include/boost/contract/free_function.hpp +++ b/include/boost/contract/free_function.hpp @@ -2,15 +2,15 @@ #ifndef BOOST_CONTRACT_FREE_FUNCTION_HPP_ #define BOOST_CONTRACT_FREE_FUNCTION_HPP_ -#include #include +#include #include namespace boost { namespace contract { -boost::contract::type free_function() { - return boost::contract::type(boost::make_shared()); +boost::contract::aux::set::pre_post free_function() { + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::free_function>()); } } } // namespace diff --git a/include/boost/contract/private_member.hpp b/include/boost/contract/private_member.hpp index 3f9849a..c051bfb 100644 --- a/include/boost/contract/private_member.hpp +++ b/include/boost/contract/private_member.hpp @@ -2,17 +2,17 @@ #ifndef BOOST_CONTRACT_PRIVATE_MEMBER_HPP_ #define BOOST_CONTRACT_PRIVATE_MEMBER_HPP_ -#include #include +#include #include // TOOD: On C++11 Clang... these could static_assert enclosing func is not pub? namespace boost { namespace contract { -boost::contract::type private_member() { - return boost::contract::type(boost::make_shared()); +boost::contract::aux::set::pre_post private_member() { + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::private_member>()); } } } // namespace diff --git a/include/boost/contract/protected_member.hpp b/include/boost/contract/protected_member.hpp index 359fe13..e12281d 100644 --- a/include/boost/contract/protected_member.hpp +++ b/include/boost/contract/protected_member.hpp @@ -2,17 +2,17 @@ #ifndef BOOST_CONTRACT_PROTECTED_MEMBER_HPP_ #define BOOST_CONTRACT_PROTECTED_MEMBER_HPP_ -#include #include +#include #include // TOOD: On C++11 Clang... these could static_assert enclosing func is not pub? namespace boost { namespace contract { -boost::contract::type protected_member() { - return boost::contract::type(boost::make_shared()); +boost::contract::aux::set::pre_post protected_member() { + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::protected_member>()); } } } // namespace diff --git a/include/boost/contract/public_member.hpp b/include/boost/contract/public_member.hpp index d1986b8..f5b6aca 100644 --- a/include/boost/contract/public_member.hpp +++ b/include/boost/contract/public_member.hpp @@ -2,10 +2,10 @@ #ifndef BOOST_CONTRACT_PUBLIC_MEMBER_HPP_ #define BOOST_CONTRACT_PUBLIC_MEMBER_HPP_ -#include #include #include #include +#include #include // TODO: On C++11 Clang... these could static_assert enclosing func is pub? @@ -40,11 +40,11 @@ namespace boost { namespace contract { // also if there are no base classes). template -boost::contract::type public_member(Class* const object, Function const&, - Argument0 argument0, boost::contract::virtual_body const v) { - return boost::contract::type(boost::make_shared >( - v, object, argument0) +boost::contract::aux::set::pre_post public_member(Class* const object, Function + const&, Argument0 argument0, boost::contract::virtual_body const v) { + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::public_member >(v, object, argument0) ); } @@ -54,36 +54,36 @@ boost::contract::type public_member(Class* const object, Function const&, // also if there are no base classes). template -boost::contract::type public_member(Class* const object, Function const&, - Argument0 argument0) { - return boost::contract::type(boost::make_shared >( - object, argument0) +boost::contract::aux::set::pre_post public_member(Class* const object, Function + const&, Argument0 argument0) { + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::public_member >(object, argument0) ); } // Contract for public member functions with a virtual body and members of a // class that does not inherits from any base class. template -boost::contract::type public_member(Class* const object, +boost::contract::aux::set::pre_post public_member(Class* const object, boost::contract::virtual_body const v) { - return boost::contract::type(boost::make_shared >(v, object)); + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::public_member >(v, object)); } // Contract for public member functions with a non-virtual body and members of a // class that does not inherits from any base class. template -boost::contract::type public_member(Class* const object) { - return boost::contract::type(boost::make_shared >(object)); +boost::contract::aux::set::pre_post public_member(Class* const object) { + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::public_member >(object)); } // Contract for public static member functions. template -boost::contract::type public_member() { - return boost::contract::type(boost::make_shared >()); +boost::contract::aux::set::pre_post public_member() { + return boost::contract::aux::set::pre_post(boost::make_shared< + boost::contract::aux::function::public_static_member >()); } } } // namespace diff --git a/include/boost/contract/type.hpp b/include/boost/contract/type.hpp index cc28ea5..a5b1f4f 100644 --- a/include/boost/contract/type.hpp +++ b/include/boost/contract/type.hpp @@ -2,45 +2,31 @@ #ifndef BOOST_CONTRACT_TYPE_HPP_ #define BOOST_CONTRACT_TYPE_HPP_ -#include +#include +#include +#include +#include +#include #include namespace boost { namespace contract { class type { // This can be copied (as shallow smart pointer copy). public: - explicit type(boost::shared_ptr const self) : self_(self) {} - - virtual ~type() {} - - // TODO: Following should return special types so user cannot set pre/post - // multiple times. - - template - type& precondition(Precondition const f) { - self_->pre_ = f; - self_->pre_available(); - return *this; - } - - template - type& postcondition(Postcondition const f) { - self_->post_ = f; - self_->post_available(); - return *this; - } + /* implicit */ type(boost::contract::aux::set::pre_post const& pre_post) : + contract_(pre_post.contract_) {} -protected: - type() {} - - virtual void pre_available() {} // Called when pre functor is set. - virtual void post_available() {} // Called when post functor is set. + /* implicit */ type(boost::contract::aux::set::pre_only const& pre_only) : + contract_(pre_only.contract_) {} - boost::function pre_; - boost::function post_; + /* implicit */ type(boost::contract::aux::set::post_only const& post_only) : + contract_(post_only.contract_) {} + + /* implicit */ type(boost::contract::aux::set::nothing const& nothing) : + contract_(nothing.contract_) {} private: - boost::shared_ptr self_; + boost::shared_ptr contract_; }; } } // namespace diff --git a/include/boost/contract/virtual_body.hpp b/include/boost/contract/virtual_body.hpp index 1b8bc42..f0d4b2c 100644 --- a/include/boost/contract/virtual_body.hpp +++ b/include/boost/contract/virtual_body.hpp @@ -2,32 +2,32 @@ #ifndef BOOST_CONTRACT_VIRTUAL_BODY_HPP_ #define BOOST_CONTRACT_VIRTUAL_BODY_HPP_ -namespace boost { namespace contract { - -namespace aux { - namespace check { - template - class subcontracted_pre_post_inv; - } - namespace function { - template - class public_member; +namespace boost { + namespace contract { + namespace aux { + namespace check { + template + class subcontracted_pre_post_inv; + } + namespace function { + template + class public_member; + } + } } } +namespace boost { namespace contract { + // Must be efficient to pass this as value param (to limit user API verbosity). struct virtual_body { /* implicit */ virtual_body(int const) : action(user_call) {} - // TODO: Fix this... how? + // TODO: Fix old-of... but how? template T const oldof_(T const& value) const { return value; } private: - // TODO: See if there is a way to reduce friendship relationships (because - // they make the impl hard to follow). These ones are necessary because - // they are between public and private APIs of the lib. But maybe - // the ones among some of the private APIs of the lib could be reduced... template friend class boost::contract::aux::check::subcontracted_pre_post_inv; template friend class @@ -36,7 +36,6 @@ private: enum action_type { user_call, check_inv_only, - check_static_inv_only, check_pre_only, check_post_only }; diff --git a/test/constructor_bases.cpp b/test/constructor_bases.cpp index b1e8366..b4f2b9b 100644 --- a/test/constructor_bases.cpp +++ b/test/constructor_bases.cpp @@ -1,6 +1,7 @@ #include "aux_/oteststream.hpp" #include +#include #include #include #include diff --git a/test/destructor_bases.cpp b/test/destructor_bases.cpp index 865a1ff..eba81ce 100644 --- a/test/destructor_bases.cpp +++ b/test/destructor_bases.cpp @@ -1,6 +1,7 @@ #include "aux_/oteststream.hpp" #include +#include #include #include #include @@ -21,7 +22,7 @@ struct d { // Test inheritance level 0. ~d() { boost::contract::type c = boost::contract::destructor(this) - .postcondition([&] () { + .postcondition([&] { out << "d::dtor::post" << std::endl; }) ; @@ -46,7 +47,7 @@ struct c // Test inheritance level 1. ~c() { boost::contract::type c = boost::contract::destructor(this) - .postcondition([&] () { + .postcondition([&] { out << "c::dtor::post" << std::endl; }) ; @@ -65,7 +66,7 @@ struct b { // Test inheritance level 0. ~b() { boost::contract::type c = boost::contract::destructor(this) - .postcondition([&] () { + .postcondition([&] { out << "b::dtor::post" << std::endl; }) ; @@ -90,7 +91,7 @@ struct a // Test multiple inheritance and inheritance level 2. ~a() { boost::contract::type c = boost::contract::destructor(this) - .postcondition([&] () { + .postcondition([&] { out << "a::dtor::post" << std::endl; }) ; diff --git a/test/free_function.cpp b/test/free_function.cpp index e9a4cd1..3a685cb 100644 --- a/test/free_function.cpp +++ b/test/free_function.cpp @@ -1,6 +1,7 @@ #include "aux_/oteststream.hpp" #include +#include #include #include @@ -10,10 +11,10 @@ boost::contract::aux::test::oteststream out; void f() { boost::contract::type c = boost::contract::free_function() - .precondition([&] () { + .precondition([&] { out << "f::pre" << std::endl; }) - .postcondition([&] () { + .postcondition([&] { out << "f::post" << std::endl; }) ; diff --git a/test/private_member_bases.cpp b/test/private_member_bases.cpp index 25a3520..abab645 100644 --- a/test/private_member_bases.cpp +++ b/test/private_member_bases.cpp @@ -1,6 +1,7 @@ #include "aux_/oteststream.hpp" #include +#include #include #include #include diff --git a/test/protected_member_bases.cpp b/test/protected_member_bases.cpp index 2049561..53f0459 100644 --- a/test/protected_member_bases.cpp +++ b/test/protected_member_bases.cpp @@ -1,6 +1,7 @@ #include "aux_/oteststream.hpp" #include +#include #include #include #include diff --git a/test/public_member_bases_static.cpp b/test/public_member_bases_static.cpp index 8db1970..4de5ed0 100644 --- a/test/public_member_bases_static.cpp +++ b/test/public_member_bases_static.cpp @@ -1,6 +1,7 @@ #include "aux_/oteststream.hpp" #include +#include #include #include #include diff --git a/test/public_member_bases_virtual.cpp b/test/public_member_bases_virtual.cpp index 696efc3..f3e44b7 100644 --- a/test/public_member_bases_virtual.cpp +++ b/test/public_member_bases_virtual.cpp @@ -1,6 +1,7 @@ #include "aux_/oteststream.hpp" #include +#include #include #include #include