[libc++] Fix <atomic> failures on GCC

Summary:
In https://reviews.llvm.org/D58201, we turned memory_order into an enum
class in C++20 mode. However, we were not casting memory_order to its
underlying type correctly for the GCC implementation, which broke the
build bots. I also fixed a test that was failing in C++17 mode on GCC 5.

Reviewers: EricWF, jfb, mclow.lists

Subscribers: zoecarver

Differential Revision: https://reviews.llvm.org/D58966

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@355409 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed