possible fix for local struct err not recognized in lambda on msvc 10

This commit is contained in:
Lorenzo Caminiti 2017-09-27 22:01:25 -07:00
parent 91d4a96f1f
commit fb7acedc1d
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ specified in that order.
#include <boost/contract/core/config.hpp>
#include <boost/contract/detail/decl.hpp>
#if !defined(BOOST_CONTRACT_NO_CONDITIONS) || \
#if !defined(BOOST_CONTRACT_NO_CONDITIONS) || \
defined(BOOST_CONTRACT_STATIC_LINK)
#include <boost/contract/detail/condition/cond_base.hpp>
#include <boost/contract/detail/condition/cond_post.hpp>

View File

@ -46,6 +46,8 @@ std::string ok_end() {
return ok.str();
}
struct err {};
int main() {
std::ostringstream ok;
@ -77,7 +79,6 @@ int main() {
;
BOOST_TEST(out.eq(ok.str()));
struct err {};
boost::contract::set_entry_invariant_failure(
[] (boost::contract::from) { throw err(); });