dynarmic/include/mcl/mp/metavalue/value.hpp
Merry 7eb1d05f63 Squashed 'externals/mcl/' content from commit a86a53843
git-subtree-dir: externals/mcl
git-subtree-split: a86a53843f82e4d6ca2f2e1437824495acad2712
2022-04-19 16:27:52 +01:00

30 lines
728 B
C++

// This file is part of the mcl project.
// Copyright (c) 2022 merryhime
// SPDX-License-Identifier: MIT
#pragma once
#include <cstddef>
#include <type_traits>
namespace mcl::mp {
/// A metavalue (of type VT and value v).
template<class VT, VT v>
using value = std::integral_constant<VT, v>;
/// A metavalue of type size_t (and value v).
template<size_t v>
using size_value = value<size_t, v>;
/// A metavalue of type bool (and value v). (Aliases to std::bool_constant.)
template<bool v>
using bool_value = value<bool, v>;
/// true metavalue (Aliases to std::true_type).
using true_type = bool_value<true>;
/// false metavalue (Aliases to std::false_type).
using false_type = bool_value<false>;
} // namespace mcl::mp