Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 259 Bytes
#include <iostream>
void incr(int &n)
[[ expects: 3 == n ]]
[[ ensures: 4 == n ]]
{
++n;
}
int main()
{
int n = 3;
std::cout << n << std::endl;
incr(n); // n == 4
std::cout << n << std::endl;
return 0;
}
You can’t perform that action at this time.