Digital Mars C++ Compiler is the only C++ compiler which implements DbC. It isn’t an open source project, but we can get it free. A programmer can write the contract naturally with this compiler.
It was developed by Walter Bright who is the D programming language developer. D is based on Digital Mars C++ Compiler.
How to write the contract with this compiler? We must write under-score as prefix for the contract:
long square_root(long x)
assert(x >= 0);
assert((result * result) == x);
That DbC is like to D’s style.