Transferring from my StackOverflow question:
There appears to be a compiler bug related to using a lambda type as a template parameter. I haven't been able to precisely characterize it, but I have a very small (~20 lines) program that will generate the compiler error. Hopefully someone with more expertise can start from my code, precisely characterize the problem, and identify what the compiler bug is here.
The "Steps to reproduce" section has the full code.
This is a blocking issue for me because, although the sample code I've given is a minimal toy program, the API for a library I'm developing requires the same form of code. I haven't been able to figure out a workaround without significantly changing my API in undesirable ways.
Of course, if there's an explanation for why this problem I'm encountering is actually just because my C++11 code is incorrect, I'd like to know! Thanks!