Files
contract/test/constructor/no_pre-error.cpp

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;
}