Visual Studio 2010 refuses to pass union templates as template template parameters.
The following code fails to compile
template<template<class> class S>
The error message is the following:
error C3200: 'foo' : invalid template argument for template parameter 'S', expected a class template
Changing foo to be a structure makes it work as expected.
Unions are classes, and this should work. It does work with other compilers like GCC or Clang.
This bug seriously impedes the usage of unions in code that makes use of meta-programming.
Unions can be necessary in the low-level details of high-performance code, a field where meta-programming techniques are quite popular.