Can using a lambda in header files violate the ODR?
This boils down to whether or not a lambda’s type differs across translation units. If it does, it may affect template argument deduction and potentially cause different functions to be called – in what are meant to be consistent definitions. That would violate the ODR (see below). However, that isn’t intended. In fact, this problem … Read more