Apparently you must say that TElem is a template, even though that can all be figured out from the declarations

Fixes compilation with GCC 4.9

GCC 4.8 and clang seem to be just fine with the change. With this #13 #14 and #16 our codebase compiles with GCC 4.9