chromium/third_party/skia/src/base/SkBitmaskEnum.h

/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef SkEnumOperators_DEFINED
#define SkEnumOperators_DEFINED

#include <type_traits>

namespace sknonstd {
template <typename T> struct is_bitmask_enum : std::false_type {};

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, bool> constexpr Any(E e) {}
}  // namespace sknonstd

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, E> constexpr operator|(E l, E r) {}

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, E&> constexpr operator|=(E& l, E r) {}

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, E> constexpr operator&(E l, E r) {}

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, E&> constexpr operator&=(E& l, E r) {}

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, E> constexpr operator^(E l, E r) {}

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, E&> constexpr operator^=(E& l, E r) {}

template <typename E>
std::enable_if_t<sknonstd::is_bitmask_enum<E>::value, E> constexpr operator~(E e) {}

#endif  // SkEnumOperators_DEFINED