I'm interested in studying the recently accepted contract programming for C++20 for learning and investigation purpose.
As I'm looking around for compiler support, I'm disappointed to not find any. Both gcc
and clang
are quite clear they do not support this feature within their --std=c++2a
mode.
Since the approval is pretty recent, I'm not too surprised that current compilers do not support the exact semantic proposed. What is more surprising to me though is that there is absolutely nothing, not even a compiler-specific extension which would mimic, even in a limited way, the same feature.
I was expecting the C++ committee to only consider features that have proven themselves on the field, typically through compiler or target specific extensions. Approving this feature for C++20 suggests that the feature should be accessible somewhere. But so far, I've been unable to find it.
Is there a way to experiment with C++ contract programming currently ? even using a set of compiler-specific extensions ?