Skip to content

Commit

Permalink
Bug 1679492 - Remove parts that are unused from mfbt/TemplateLib. r=s…
Browse files Browse the repository at this point in the history
…ergesanspaille

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
  • Loading branch information
abpostelnicu committed Apr 18, 2023
1 parent 9ed92a7 commit 3d035ca
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 44 deletions.
12 changes: 0 additions & 12 deletions mfbt/TemplateLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 0 additions & 30 deletions mfbt/tests/TestTemplateLib.cpp

This file was deleted.

1 change: 0 additions & 1 deletion mfbt/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ CppUnitTests(
"TestSIMD",
"TestSmallPointerArray",
"TestSplayTree",
"TestTemplateLib",
"TestTextUtils",
"TestTypedEnum",
"TestUniquePtr",
Expand Down
1 change: 0 additions & 1 deletion testing/cppunittest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ skip-if = asan || tsan # Not built on sanitizer builds
[TestSPSCQueue]
[TestStackCookie]
skip-if = os != 'win'
[TestTemplateLib]
[TestTextUtils]
[TestThreadSafeWeakPtr]
[TestTypedEnum]
Expand Down

0 comments on commit 3d035ca

Please sign in to comment.