Commit 56ce4f44 authored by Nathan Bronson's avatar Nathan Bronson Committed by Facebook GitHub Bot

update AtomicUtilTest and TraitsTest for c++20 standard

Summary:
This diff fixes a couple small issues in some folly tests that
are exposed when compiling with VS2019.

Reviewed By: yfeldblum

Differential Revision: D20845004

fbshipit-source-id: 44a3e140f2bb4334c4eb81ae80297da4975a13ae
parent c429f97d
......@@ -91,9 +91,9 @@ TEST_F(AtomicCompareExchangeSuccTest, examples) {
// properties
for (auto succ : {relaxed, consume, acquire, release, acq_rel, seq_cst}) {
SCOPED_TRACE(succ);
SCOPED_TRACE(static_cast<int>(succ));
for (auto fail : {relaxed, consume, acquire, seq_cst}) {
SCOPED_TRACE(fail);
SCOPED_TRACE(static_cast<int>(fail));
EXPECT_EQ(succ, atomic_compare_exchange_succ(false, succ, fail));
auto const sfix = atomic_compare_exchange_succ(true, succ, fail);
EXPECT_GE(sfix, succ);
......
......@@ -112,11 +112,11 @@ template <bool V>
struct Cond {
template <typename K = std::string>
static auto fun_std(std::conditional_t<V, K, std::string>&& arg) {
return std::is_same<remove_cvref_t<decltype(arg)>, std::string>{};
return std::is_same<folly::remove_cvref_t<decltype(arg)>, std::string>{};
}
template <typename K = std::string>
static auto fun_folly(folly::conditional_t<V, K, std::string>&& arg) {
return std::is_same<remove_cvref_t<decltype(arg)>, std::string>{};
return std::is_same<folly::remove_cvref_t<decltype(arg)>, std::string>{};
}
};
......
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