15 Oct
2013
15 Oct
'13
1:56 a.m.
On 10/14/2013 4:28 PM, Rodrigo Madera wrote:
Then again, taking a deeper look on your snippet, you are sorting all kinds of types.
I remember seeing something similar in a thread here and found it at [1].
It works by creating an ascending sequence of types, and sorting them according to the distance (or rather the index) of the types. You may need to put some more types in there according to what you expect from your clients.
Your other option is providing the less<> types needed for sort<> to know the ordering relation between types.
I ended up just creating a set from the types instead.
typedef typename fold< vector