mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 10:45:50 +00:00
refactor: remove TypedField's move constructor (#4567)
Apply a minor cleanup in `TypedField`: * Remove a non-working and unused move constructor. * Constrain the remaining constructor to not be overly generic enough as to be used as a copy or move constructor.
This commit is contained in:
@@ -275,13 +275,7 @@ struct TypedField : SField
|
||||
using type = T;
|
||||
|
||||
template <class... Args>
|
||||
explicit TypedField(Args&&... args) : SField(std::forward<Args>(args)...)
|
||||
{
|
||||
}
|
||||
|
||||
TypedField(TypedField&& u) : SField(std::move(u))
|
||||
{
|
||||
}
|
||||
explicit TypedField(private_access_tag_t pat, Args&&... args);
|
||||
};
|
||||
|
||||
/** Indicate std::optional field semantics. */
|
||||
|
||||
@@ -38,6 +38,13 @@ struct SField::private_access_tag_t
|
||||
|
||||
static SField::private_access_tag_t access;
|
||||
|
||||
template <class T>
|
||||
template <class... Args>
|
||||
TypedField<T>::TypedField(private_access_tag_t pat, Args&&... args)
|
||||
: SField(pat, std::forward<Args>(args)...)
|
||||
{
|
||||
}
|
||||
|
||||
// Construct all compile-time SFields, and register them in the knownCodeToField
|
||||
// database:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user