
03.06.2015 23:42, Andrzej Krzemienski:
Could you provide some sketch of a real life scenario? The examples show how I can use it, but I fail to imagine why I would need it. You mentioned storing the results of various DB queries, how would you make use of data stored in such way?
For example, It can be used as fast drop-in replacement for std::vector<boost::variant<Types...>> in case when order of elements (across different types) is not important. For instance CAD application may want to process all objects, like draw all of them or apply some filter or serialize. There is no need to pay cost of dynamic dispatch on each element. By the way, https://akrzemi1.wordpress.com/2013/12/11/type-erasure-part-iii/#comment-175... Best Regards, Evgeny Panasyuk