Hacker Newsnew | past | comments | ask | show | jobs | submit | amazing42's commentslogin

Thanks for bringing this up. Now you can use cmake find_package with it.


Thank you!


That is true. Hopefully, adding more static_assert to the lib can fail the compiler early and give more instructive error message.


Yeah, that is super cool feature of compiler explorer compared to other online compiler.


Actually this library (match(it)) is more similar to Racket. You can see there are lots of patterns borrowed from Racket pattern matching, say app pattern and ooo pattern.


Sadly lvariant did not get into C++ language. The library supports pattern matching against std::variant/std::any and class inheritance as a replacement.


The godbolt link is only a simple sample.

Rust does not support view pattern (called in Haskell) or app pattern (called in Racket). And that has been implemented in this library.


Yeah. That is supported.


Thanks for your comment!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: