[libc++] Add a test for PR40977

Even though the header makes the exact same check since https://llvm.org/D59063,
the headers could conceivably change in the future and introduce a bug.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356376 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed