Under Linux, this command works:
clang --std=c++11 -stdlib=libstdc++ loopy.cpp -o loopy -static -lstdc++
Where loopy
is of course the name of my program.
Update:
It appears that Apple strongly discourages static linking so it suggests another approach is needed.
This answer on creating backwards compatible OS X software may be of use to you instead.