Commit 29ea4cac authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Fix C++20 build issues

Summary: Fix C++20 build issues

Reviewed By: ispeters

Differential Revision: D31842893

fbshipit-source-id: 64a4332939fd101b99ccba6f27c7df740a346844
parent bdf5b490
......@@ -203,7 +203,11 @@ Range<int const*> foo(small_vector<int, 2> const& sv) {
TEST(HeterogeneousAccess, transparentMatches) {
runTestMatches<std::string>("abcd");
#if !defined(__cpp_lib_char8_t) || __cpp_lib_char8_t < 201907
runTestMatches<std::string>(u8"abcd");
#else
runTestMatches<std::u8string>(u8"abcd");
#endif
runTestMatches<std::wstring>(L"abcd");
runTestMatches<std::u16string>(u"abcd");
runTestMatches<std::u32string>(U"abcd");
......
......@@ -338,13 +338,14 @@ template <class T>
class SwapTrackingAlloc {
public:
using Alloc = std::allocator<T>;
using value_type = typename Alloc::value_type;
using pointer = typename Alloc::pointer;
using const_pointer = typename Alloc::const_pointer;
using reference = typename Alloc::reference;
using const_reference = typename Alloc::const_reference;
using size_type = typename Alloc::size_type;
using AllocTraits = std::allocator_traits<Alloc>;
using value_type = typename AllocTraits::value_type;
using pointer = typename AllocTraits::pointer;
using const_pointer = typename AllocTraits::const_pointer;
using reference = value_type&;
using const_reference = value_type const&;
using size_type = typename AllocTraits::size_type;
using propagate_on_container_swap = std::true_type;
using propagate_on_container_copy_assignment = std::true_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment