This is due to iterator debugging feature, which calls the predicate a second time with reversed parameters. Builds fine in release configuration.
Related issue on StackOverflow: https://stackoverflow.com/questions/47835321/lower-bound-function-cannot-compile-in-debug-mode
Workaround: add this code before the first #include to disable iterator debugging for this compilation unit:
#if defined(_MSC_VER) && _MSC_VER <= 1500
#define _HAS_ITERATOR_DEBUGGING 0
#endif