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:
Howard Hinnant
2023-06-26 15:32:10 -04:00
committed by tequ
parent f8dc0cab65
commit 37f7734b25
2 changed files with 8 additions and 7 deletions

View File

@@ -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. */

View File

@@ -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: