Program 1:
#define min(a, b) ((a) < (b) ? (a) : (b)) struct S { static int const n = 0; }; int main() { return min(S::n, 1); }
Program 2:
#include <algorithm> struct S { static int const n = 0; }; int main() { return std::min(S::n, 1); }
Program 3:
#include <algorithm> struct S { static int const n = 0; }; int main() { return std::min({S::n, 1}); }
Where is the bug?
Right, program 2 lacks a definition of S::n.
std::min(T const &, T const &) takes its arguments by reference, so S::n does get odr-used there.
std::min(std::initializer_list<T>) does not have that gotcha.
