// Test constructor cannot use `.precondition(...)`. #include #include struct a { a() { boost::contract::guard c = boost::contract::constructor(this) .precondition([] {}) // Error (must use constructor_precondition). ; } }; int main() { a aa; return 0; }