> There is if you include test.hpp in multiple translation units (and > the compiler has to assume you will) because foo() is not declared > inline. Do that and the warning goes away. I see. Is there something about a nested class, template specialization, or a base class that causes that example to be an ODR violation but not this one (which GCC does not warn about): template <typename T> struct inner { static const bool value = true; }; bool foo() { auto lambda = [](){}; typedef decltype(lambda) Lambda; return inner<Lambda>::value; } Thanks, Nate