この C++ コントラクトの単純な使用法では、error: no type named 'fail_fast' in namespace 'gsl'
. try ブロックはfast_fail
例外またはその他の例外をスローしますか?
#define GSL_THROW_ON_CONTRACT_VIOLATION
#include <gsl/gsl>
#include <iostream>
int main(void)
{
try {
Expects(false);
}
catch(const gsl::fail_fast &e) {
std::cout << "exception: " << e.what() << '\n';
}
}