Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (16 sloc) 260 Bytes
#include <iostream>
#include "contract"
void violation_handler(const std::contract_violation&)
{
throw std::exception();
}
int foo(int n) noexcept
[[ expects: n > 0 ]]
{
return n*n;
}
int main()
{
foo(0);
return 0;
}
You can’t perform that action at this time.