Boost logo

Boost :

Subject: [boost] Variadic to Head/Tail TMP List
From: Fernando Pelliccioni (fpelliccioni_at_[hidden])
Date: 2012-04-25 08:39:45


Is this piece of code useful ?

The purpose is to tranform code like the following:

    typedef cons<int, cons<float, cons<char, cons<string>>>> t0;
       // fusion::cons or similar data structures


    typedef chain_generator<cons, nil> cons_gen;
    typedef cons_gen::gen<int, float, char, std::string>::type t1;

I don't know if there is something similar in a library.
I think it could be useful.

Compiler tests:
GCC 4.7 -> Compiler Error
GCC 4.7.1 & Trunk -> OK
Clang Trunk -> OK
MSVC 11 beta -> has no Variadic Templates


Boost list run by bdawes at, gregod at, cpdaniel at, john at