C++11

Reference #1401.

Change much stuff to use new library.
Never use a `#define` when you can use a `static const` variable instead. That's why.