Hacker News new | comments | show | ask | jobs | submit login

The macro trick is at https://github.com/philsquared/Catch/blob/785db43bb2cd64bfe7...: planting the tested expression to the right of an operator ->*, which is overloadable and allows for changing the type of the left hand side in the comparison. The rest is a "simple matter of programming". Clever but probably a bit cute - errors would look weird if the expression isn't set up as expected.



Also uses template to overload operator ->*

https://github.com/philsquared/Catch/blob/785db43bb2cd64bfe7...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: