Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Set Theory in C++11

Have you ever felt the need to perform set theoretic operations on types? Not really? Me neither, but I thought it’s a fun thing to try out. So, if you ever feel the need of using type sets, C++11 makes it quite easy to do so. Especially variadic templates allow for a much more condensed syntax compared to type list constructs formerly used. (Disclaimer: This is rather a proof of concept, but maybe somebody comes up with a useful scenario.)Let’s start by defining an empty type_set type:template<typename ... Types>struct type_set; typedef type_set<>...

2,714 0       C++ MATH SET THEORY