mirror of
https://github.com/boostorg/contract.git
synced 2026-02-27 17:02:15 +00:00
18 lines
319 B
C++
18 lines
319 B
C++
|
|
#include <boost/contract/scoped.hpp>
|
|
#include <boost/contract/constructor.hpp>
|
|
|
|
struct a {
|
|
a() {
|
|
boost::contract::scoped contract = boost::contract::constructor(this)
|
|
.precondition([] {}) // Error (must use constructor_precondition).
|
|
;
|
|
}
|
|
};
|
|
|
|
int main() {
|
|
a aa;
|
|
return 0;
|
|
}
|
|
|