October 7th, 2013, 03:20 AM
I ended up using Superbonzo's technique.
October 6th, 2013, 05:40 AM
As I've just discovered, this technique does not compile if any of the template parameters have copy constructors.
On Visual Studio this gives error C2621
September 11th, 2013, 09:57 AM
Thanks :thumb:
I haven't delved much into TMP yet (It tends to give me a headache quite quickly) but I'll squirrel that information away for future reference.
September 11th, 2013, 08:51 AM
I work with embedded projects and, unfortunately, the compilers aren't likely to have C++11 support for a while yet. :sick:
September 9th, 2013, 07:53 AM
Yes that would be simpler.
The technique I used was from a more generic solution for templates with variable numbers of type parameters.
September 9th, 2013, 03:13 AM
That's what I thought, but I just got a bit paranoid about missing some dark corner case.
September 6th, 2013, 10:29 AM
Can people just do a quick sanity check of this concept?
I'm playing around with a technique to parameterise a template with the largest 'sizeof'
result for a set of classes.
A, B, C & D are...