mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-14 03:29:28 +07:00
remove void_flags
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
#include "meta_traits/number_traits.hpp"
|
||||
#include "meta_traits/pointer_traits.hpp"
|
||||
#include "meta_traits/reference_traits.hpp"
|
||||
#include "meta_traits/void_traits.hpp"
|
||||
|
||||
#include "meta_types.hpp"
|
||||
#include "meta_types/any_type.hpp"
|
||||
|
||||
@@ -100,9 +100,6 @@ namespace meta_hpp
|
||||
is_rvalue = 1 << 2,
|
||||
};
|
||||
|
||||
enum class void_flags : std::uint32_t {
|
||||
};
|
||||
|
||||
ENUM_HPP_OPERATORS_DECL(array_flags)
|
||||
ENUM_HPP_OPERATORS_DECL(class_flags)
|
||||
ENUM_HPP_OPERATORS_DECL(ctor_flags)
|
||||
@@ -113,5 +110,4 @@ namespace meta_hpp
|
||||
ENUM_HPP_OPERATORS_DECL(number_flags)
|
||||
ENUM_HPP_OPERATORS_DECL(pointer_flags)
|
||||
ENUM_HPP_OPERATORS_DECL(reference_flags)
|
||||
ENUM_HPP_OPERATORS_DECL(void_flags)
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "https://github.com/blackmatov/meta.hpp"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2021, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../meta_base.hpp"
|
||||
#include "../meta_traits.hpp"
|
||||
|
||||
namespace meta_hpp::detail
|
||||
{
|
||||
template < void_kind Void >
|
||||
struct void_traits {
|
||||
[[nodiscard]] static constexpr bitflags<void_flags> make_flags() noexcept {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -412,7 +412,6 @@ namespace meta_hpp
|
||||
[[nodiscard]] explicit operator bool() const noexcept;
|
||||
|
||||
[[nodiscard]] type_id get_id() const noexcept;
|
||||
[[nodiscard]] bitflags<void_flags> get_flags() const noexcept;
|
||||
private:
|
||||
detail::void_type_data_ptr data_;
|
||||
friend auto detail::data_access<void_type>(const void_type&);
|
||||
@@ -565,8 +564,6 @@ namespace meta_hpp::detail
|
||||
};
|
||||
|
||||
struct void_type_data final : type_data_base {
|
||||
const bitflags<void_flags> flags;
|
||||
|
||||
template < void_kind Void >
|
||||
explicit void_type_data(type_list<Void>);
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#include "../meta_base.hpp"
|
||||
#include "../meta_types.hpp"
|
||||
|
||||
#include "../meta_traits/void_traits.hpp"
|
||||
|
||||
namespace meta_hpp::detail
|
||||
{
|
||||
template < void_kind Void >
|
||||
@@ -19,8 +17,7 @@ namespace meta_hpp::detail
|
||||
template < void_kind Void >
|
||||
// NOLINTNEXTLINE(readability-named-parameter)
|
||||
void_type_data::void_type_data(type_list<Void>)
|
||||
: type_data_base{type_id{type_list<void_tag<Void>>{}}, type_kind::void_}
|
||||
, flags{void_traits<Void>::make_flags()} {}
|
||||
: type_data_base{type_id{type_list<void_tag<Void>>{}}, type_kind::void_} {}
|
||||
|
||||
template < void_kind Void >
|
||||
void_type_data_ptr void_type_data::get_static() {
|
||||
@@ -45,8 +42,4 @@ namespace meta_hpp
|
||||
inline type_id void_type::get_id() const noexcept {
|
||||
return data_->id;
|
||||
}
|
||||
|
||||
inline bitflags<void_flags> void_type::get_flags() const noexcept {
|
||||
return data_->flags;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user