update boost
This commit is contained in:
@@ -12,11 +12,13 @@
|
||||
#include <boost/contract/detail/declspec.hpp>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost { namespace contract { namespace detail {
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4275) // Base w/o DLL spec (noncopyable).
|
||||
#pragma warning(disable: 4251) // Member w/o DLL spec (mutex_ type).
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/preprocessor/facilities/empty.hpp>
|
||||
#endif
|
||||
|
||||
/* PRIVATE */
|
||||
@@ -73,7 +74,7 @@ public:
|
||||
#ifndef BOOST_CONTRACT_NO_POSTCONDITIONS
|
||||
BOOST_CONTRACT_DETAIL_COND_POST_DEF_(
|
||||
none,
|
||||
unused,
|
||||
/* r */ BOOST_PP_EMPTY(),
|
||||
void (),
|
||||
// Won't raise this error if NO_POST (for optimization).
|
||||
BOOST_CONTRACT_ERROR_postcondition_result_parameter_not_allowed,
|
||||
|
||||
@@ -143,7 +143,10 @@ public:
|
||||
boost::contract::from from,
|
||||
boost::contract::virtual_* v,
|
||||
C* obj,
|
||||
VR& r
|
||||
VR&
|
||||
#ifndef BOOST_CONTRACT_NO_POSTCONDITIONS // Avoid unused param warning.
|
||||
r
|
||||
#endif
|
||||
BOOST_CONTRACT_DETAIL_TVARIADIC_COMMA(BOOST_CONTRACT_MAX_ARGS)
|
||||
BOOST_CONTRACT_DETAIL_TVARIADIC_FPARAMS_Z(1,
|
||||
BOOST_CONTRACT_MAX_ARGS, Args, &, args)
|
||||
|
||||
31
linx64/include/boost/contract/detail/exception.hpp
Normal file
31
linx64/include/boost/contract/detail/exception.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef BOOST_CONTRACT_DETAIL_EXCEPTION_HPP_
|
||||
#define BOOST_CONTRACT_DETAIL_EXCEPTION_HPP_
|
||||
|
||||
// Copyright (C) 2008-2019 Lorenzo Caminiti
|
||||
// Distributed under the Boost Software License, Version 1.0 (see accompanying
|
||||
// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
|
||||
// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <exception>
|
||||
|
||||
namespace boost { namespace contract { namespace detail {
|
||||
|
||||
// Using this instead of std::uncaught_exception() because
|
||||
// std::uncaught_exception will be removed in C++20.
|
||||
inline bool uncaught_exception() BOOST_NOEXCEPT {
|
||||
// Alternatively, this could just return `boost::core::uncaught_exceptions()
|
||||
// > 0` but that emulates the exception count which is not needed by this
|
||||
// lib (the implementation below is simpler and could be faster).
|
||||
#ifdef __cpp_lib_uncaught_exceptions
|
||||
return std::uncaught_exceptions() > 0;
|
||||
#else
|
||||
return std::uncaught_exception();
|
||||
#endif
|
||||
}
|
||||
|
||||
} } } // namespace
|
||||
|
||||
#endif // #include guard
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <boost/contract/core/config.hpp>
|
||||
#include <boost/contract/detail/condition/cond_inv.hpp>
|
||||
#include <boost/contract/detail/none.hpp>
|
||||
#include <boost/contract/detail/exception.hpp>
|
||||
#if !defined(BOOST_CONTRACT_ALL_DISABLE_NO_ASSERTION) && ( \
|
||||
!defined(BOOST_CONTRACT_NO_INVARIANTS) || \
|
||||
!defined(BOOST_CONTRACT_NO_POSTCONDITIONS) || \
|
||||
@@ -70,7 +71,7 @@ public:
|
||||
|
||||
// If ctor body threw, no obj so check only static inv. Otherwise,
|
||||
// obj constructed so check static inv, non-static inv, and post.
|
||||
if(std::uncaught_exception()) {
|
||||
if(uncaught_exception()) {
|
||||
#ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
|
||||
this->check_exit_static_inv();
|
||||
#endif
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <boost/contract/core/config.hpp>
|
||||
#include <boost/contract/detail/condition/cond_inv.hpp>
|
||||
#include <boost/contract/detail/none.hpp>
|
||||
#include <boost/contract/detail/exception.hpp>
|
||||
#if !defined(BOOST_CONTRACT_ALL_DISABLE_NO_ASSERTION) && ( \
|
||||
!defined(BOOST_CONTRACT_NO_INVARIANTS) || \
|
||||
!defined(BOOST_CONTRACT_NO_POSTCONDITIONS) || \
|
||||
@@ -77,7 +78,7 @@ public:
|
||||
// language allows for that (even if in C++11 dtors declarations are
|
||||
// implicitly noexcept(true) unless specified otherwise) so this
|
||||
// library must handle such a case.
|
||||
if(std::uncaught_exception()) {
|
||||
if(uncaught_exception()) {
|
||||
#ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
|
||||
this->check_exit_all_inv();
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <boost/contract/core/exception.hpp>
|
||||
#include <boost/contract/core/config.hpp>
|
||||
#include <boost/contract/detail/condition/cond_post.hpp>
|
||||
#include <boost/contract/detail/exception.hpp>
|
||||
#if !defined(BOOST_CONTRACT_ALL_DISABLE_NO_ASSERTION) && ( \
|
||||
!defined(BOOST_CONTRACT_NO_PRECONDITIONS) || \
|
||||
!defined(BOOST_CONTRACT_NO_POSTCONDITIONS) || \
|
||||
@@ -63,7 +64,7 @@ public:
|
||||
checking k;
|
||||
#endif
|
||||
|
||||
if(std::uncaught_exception()) {
|
||||
if(uncaught_exception()) {
|
||||
#ifndef BOOST_CONTRACT_NO_EXCEPTS
|
||||
this->check_except();
|
||||
#endif
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
#include <boost/contract/core/virtual.hpp>
|
||||
#include <boost/contract/core/exception.hpp>
|
||||
#include <boost/contract/core/config.hpp>
|
||||
#include <boost/contract/core/virtual.hpp>
|
||||
#include <boost/contract/detail/condition/cond_subcontracting.hpp>
|
||||
#include <boost/contract/detail/tvariadic.hpp>
|
||||
#include <boost/contract/core/virtual.hpp>
|
||||
#include <boost/contract/detail/exception.hpp>
|
||||
#if !defined(BOOST_CONTRACT_ALL_DISABLE_NO_ASSERTION) && ( \
|
||||
!defined(BOOST_CONTRACT_NO_INVARIANTS) || \
|
||||
!defined(BOOST_CONTRACT_NO_PRECONDITIONS) || \
|
||||
@@ -113,7 +114,7 @@ private:
|
||||
#ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
|
||||
this->check_subcontracted_exit_inv();
|
||||
#endif
|
||||
if(std::uncaught_exception()) {
|
||||
if(uncaught_exception()) {
|
||||
#ifndef BOOST_CONTRACT_NO_EXCEPTS
|
||||
this->check_subcontracted_except();
|
||||
#endif
|
||||
@@ -141,7 +142,7 @@ public:
|
||||
#ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
|
||||
this->check_subcontracted_exit_inv();
|
||||
#endif
|
||||
if(std::uncaught_exception()) {
|
||||
if(uncaught_exception()) {
|
||||
#ifndef BOOST_CONTRACT_NO_EXCEPTS
|
||||
this->check_subcontracted_except();
|
||||
#endif
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <boost/contract/core/config.hpp>
|
||||
#include <boost/contract/detail/condition/cond_inv.hpp>
|
||||
#include <boost/contract/detail/none.hpp>
|
||||
#include <boost/contract/detail/exception.hpp>
|
||||
#if !defined(BOOST_CONTRACT_ALL_DISABLE_NO_ASSERTION) && ( \
|
||||
!defined(BOOST_CONTRACT_NO_INVARIANTS) || \
|
||||
!defined(BOOST_CONTRACT_NO_PRECONDITIONS) || \
|
||||
@@ -84,7 +85,7 @@ public:
|
||||
#ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
|
||||
this->check_exit_static_inv();
|
||||
#endif
|
||||
if(std::uncaught_exception()) {
|
||||
if(uncaught_exception()) {
|
||||
#ifndef BOOST_CONTRACT_NO_EXCEPTS
|
||||
this->check_except();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user