mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-04 01:06:19 +08:00
Remove boilerplate from rfl::internal::get_field_names
Also delete rfl::internal::get_field_name_ptrs, its previous purpose was to store boilerplate but after the previous commit, and it only being used in one place, it can be removed without issues
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
#ifndef RFL_INTERNAL_GETFIELDNAMEPTRS_HPP_
|
||||
#define RFL_INTERNAL_GETFIELDNAMEPTRS_HPP_
|
||||
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <source_location>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
#include "rfl/internal/fake_object.hpp"
|
||||
#include "rfl/internal/is_flatten_field.hpp"
|
||||
#include "rfl/internal/is_rename.hpp"
|
||||
#include "rfl/internal/to_ptr_tuple.hpp"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wundefined-var-template"
|
||||
#endif
|
||||
|
||||
namespace rfl {
|
||||
namespace internal {
|
||||
|
||||
/// Returns a tuple of pointers required to extract the field names.
|
||||
template <class T>
|
||||
constexpr auto get_field_name_ptrs() {
|
||||
return to_ptr_tuple(fake_object<T>);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace rfl
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user