mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1679492 - Remove parts that are unused from mfbt/TemplateLib. r=sergesanspaille
Some implementations from TemplateLib are easily changeable with std functionality. mozilla::tl::And has been removed and replaced with std::conjuction Differential Revision: https://phabricator.services.mozilla.com/D175762
This commit is contained in:
parent
9ed92a7918
commit
3d035ca8b1
@ -119,18 +119,6 @@ struct MulOverflowMask<1> {
|
||||
static const size_t value = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* And<bool...> computes the logical 'and' of its argument booleans.
|
||||
*
|
||||
* Examples:
|
||||
* mozilla::t1::And<true, true>::value is true.
|
||||
* mozilla::t1::And<true, false>::value is false.
|
||||
* mozilla::t1::And<>::value is true.
|
||||
*/
|
||||
|
||||
template <bool... C>
|
||||
struct And : std::integral_constant<bool, (C && ...)> {};
|
||||
|
||||
} // namespace tl
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -1,30 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/TemplateLib.h"
|
||||
|
||||
using mozilla::tl::And;
|
||||
|
||||
static_assert(And<>::value == true, "And<>::value should be true");
|
||||
static_assert(And<true>::value == true, "And<true>::value should be true");
|
||||
static_assert(And<false>::value == false, "And<false>::value should be false");
|
||||
static_assert(And<false, true>::value == false,
|
||||
"And<false, true>::value should be false");
|
||||
static_assert(And<false, false>::value == false,
|
||||
"And<false, false>::value should be false");
|
||||
static_assert(And<true, false>::value == false,
|
||||
"And<true, false>::value should be false");
|
||||
static_assert(And<true, true>::value == true,
|
||||
"And<true, true>::value should be true");
|
||||
static_assert(And<true, true, true>::value == true,
|
||||
"And<true, true, true>::value should be true");
|
||||
static_assert(And<true, false, true>::value == false,
|
||||
"And<true, false, true>::value should be false");
|
||||
|
||||
int main() {
|
||||
// Nothing to do here.
|
||||
return 0;
|
||||
}
|
@ -60,7 +60,6 @@ CppUnitTests(
|
||||
"TestSIMD",
|
||||
"TestSmallPointerArray",
|
||||
"TestSplayTree",
|
||||
"TestTemplateLib",
|
||||
"TestTextUtils",
|
||||
"TestTypedEnum",
|
||||
"TestUniquePtr",
|
||||
|
@ -82,7 +82,6 @@ skip-if = asan || tsan # Not built on sanitizer builds
|
||||
[TestSPSCQueue]
|
||||
[TestStackCookie]
|
||||
skip-if = os != 'win'
|
||||
[TestTemplateLib]
|
||||
[TestTextUtils]
|
||||
[TestThreadSafeWeakPtr]
|
||||
[TestTypedEnum]
|
||||
|
Loading…
Reference in New Issue
Block a user