On Mon, 21 Jul 2014 11:45:51 -0700, Damien Buhl
On 16/07/2014 2:14 PM, Mostafa wrote: On Tue, 15 Jul 2014 18:27:07 -0700, Michael Shepanski [snip] Out of curiosity, does the library *need* to be written in C++11, and, if so, why?
If I tried to rewrite it in C++03, its length would multiply, if only because of the need to replace variadic templates by a combinatorial explosion of overloads.
But your question was about *need*, so perhaps the uses of decltype are more relevant. I do not think I could rewrite them to avoid decltype. (Maybe somebody else could, but I found it hard enough without any such constraint.)
As I'm currently doing it for Boost.Fusion, your macro to adapt the types could take advantage of Boost.TypeOf which would be your replacement for decltype : http://www.boost.org/doc/libs/1_55_0/doc/html/typeof.html
That's what I figured, and Boost.Preprocessor could be used to take care of the variadic templates. My only concern, and maybe Michael can chime in here, would be the use of temporaries. In C++11 they could be moved, but in C++03 they may have to be copied, and I wonder if that would become costly with quince's design.