C++11 template to generate compare functions that define a strict weak order