Use gcc-compatible C++11 flag.
Remove underlying_type<E>
Remove move operator.
Remove this_thread access.