Restrict access to the virtual functions move and copy

* These are meant to be used by detail::STVar only and
  are otherwise error-prone to call.
This commit is contained in:
Howard Hinnant
2021-10-19 14:02:30 -04:00
committed by Nik Bougalis
parent 74e6ed1af3
commit 0c13676d5f
13 changed files with 103 additions and 75 deletions

View File

@@ -92,12 +92,6 @@ public:
STObject(SerialIter&& sit, SField const& name);
explicit STObject(SField const& name);
STBase*
copy(std::size_t n, void* buf) const override;
STBase*
move(std::size_t n, void* buf) override;
iterator
begin() const;
@@ -448,6 +442,13 @@ private:
template <typename T>
T&
peekField(SField const& field);
STBase*
copy(std::size_t n, void* buf) const override;
STBase*
move(std::size_t n, void* buf) override;
friend class detail::STVar;
};
//------------------------------------------------------------------------------