
Contracts
CppCast
00:00
The Syntax of a Future Feature on Audio Only Podcast
Every framework C++ framework I ever worked on had some sort of contract facility that is a little bit better than assert even though people wouldn't call it that necessarily. The connection with the lake host rule can be non-obvious but both are enabled by having a custom contract violation handler. One easy strategy to test it is tell your contract currently macro or whatever if there's a violation throw an exception and then call your function with invalid input with this with it configured to throw and then catch that exception.
Transcript
Play full episode