Commit f6f9d7ea authored by Aaryaman Sagar's avatar Aaryaman Sagar Committed by Facebook Github Bot

Leftover occurences of integral_constant<bool, ...>

Summary: title

Reviewed By: yfeldblum

Differential Revision: D8631916

fbshipit-source-id: be4ef689b9c2b0dcdd92f8ea61787f70f9a71f9c
parent 27929e3d
......@@ -1351,11 +1351,9 @@ inline std::string errorValue(const Src& value) {
}
template <typename Tgt, typename Src>
using IsArithToArith = std::integral_constant<
bool,
using IsArithToArith = bool_constant<
!std::is_same<Tgt, Src>::value && !std::is_same<Tgt, bool>::value &&
std::is_arithmetic<Src>::value &&
std::is_arithmetic<Tgt>::value>;
std::is_arithmetic<Src>::value && std::is_arithmetic<Tgt>::value>;
} // namespace detail
......
......@@ -1513,9 +1513,7 @@ class basic_fbstring {
public:
template <class ItOrLength, class ItOrChar>
iterator insert(const_iterator p, ItOrLength first_or_n, ItOrChar last_or_c) {
using Sel = std::integral_constant<
bool,
std::numeric_limits<ItOrLength>::is_specialized>;
using Sel = bool_constant<std::numeric_limits<ItOrLength>::is_specialized>;
return insertImplDiscr(p, first_or_n, last_or_c, Sel());
}
......@@ -2252,8 +2250,7 @@ inline void basic_fbstring<E, T, A, S>::replaceImpl(
Invariant checker(*this);
// Handle aliased replace
using Sel = std::integral_constant<
bool,
using Sel = bool_constant<
std::is_same<FwdIterator, iterator>::value ||
std::is_same<FwdIterator, const_iterator>::value>;
if (replaceAliased(i1, i2, s1, s2, Sel())) {
......
......@@ -208,8 +208,7 @@ class fbvector {
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
private:
typedef std::integral_constant<
bool,
typedef bool_constant<
is_trivially_copyable<T>::value &&
sizeof(T) <= 16 // don't force large structures to be passed by value
>
......
......@@ -357,8 +357,7 @@ struct copy_assignment_mixin<T, true> {
template <typename T>
struct is_constructible_from_replaceable
: std::integral_constant<
bool,
: bool_constant<
std::is_constructible<T, Replaceable<T>&>::value ||
std::is_constructible<T, Replaceable<T>&&>::value ||
std::is_constructible<T, const Replaceable<T>&>::value ||
......@@ -366,8 +365,7 @@ struct is_constructible_from_replaceable
template <typename T>
struct is_convertible_from_replaceable
: std::integral_constant<
bool,
: bool_constant<
std::is_convertible<Replaceable<T>&, T>::value ||
std::is_convertible<Replaceable<T>&&, T>::value ||
std::is_convertible<const Replaceable<T>&, T>::value ||
......
......@@ -78,7 +78,7 @@ namespace detail {
* Handy shortcuts for some standard facilities
*/
template <bool B>
using Bool = std::integral_constant<bool, B>;
using Bool = bool_constant<B>;
using True = std::true_type;
using False = std::false_type;
......
......@@ -88,9 +88,8 @@ using invoke_result_ =
template <typename F, typename... Args>
struct invoke_nothrow_
: std::integral_constant<
bool,
noexcept(invoke(std::declval<F>(), std::declval<Args>()...))> {};
: bool_constant<noexcept(
invoke(std::declval<F>(), std::declval<Args>()...))> {};
// from: http://en.cppreference.com/w/cpp/types/result_of, CC-BY-SA
......
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