Ah, so the problem here is the fact that it's a templated method?
Interesting pitfall.

Hmm I could imagine it's the fact you're doing the whole thing with a single function call using C++'s Lambda feature? At least I think that's quite a nice thing.