mirror of
https://github.com/boostorg/contract.git
synced 2026-02-27 04:52:22 +00:00
added a version of check_guard (but without any thread sync yet)
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
// Test constructor cannot use `.precondition(...)`.
|
||||
|
||||
#include <boost/contract/constructor.hpp>
|
||||
#include <boost/contract/scoped.hpp>
|
||||
#include <boost/contract/guard.hpp>
|
||||
|
||||
struct a {
|
||||
a() {
|
||||
boost::contract::scoped c = boost::contract::constructor(this)
|
||||
boost::contract::guard c = boost::contract::constructor(this)
|
||||
.precondition([] {}) // Error (must use constructor_precondition).
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user