drivertools: fix C++20 "incomplete type" error by moving constructors below other definitions

This commit is contained in:
Emily Schmidt 2024-08-22 10:40:56 +01:00
parent f456761e88
commit 9b5e81b13f
1 changed files with 15 additions and 9 deletions

View File

@ -146,11 +146,8 @@ private:
pool<DriveBit> multiple_; pool<DriveBit> multiple_;
public: public:
DriveBitMultiple() {} DriveBitMultiple();
DriveBitMultiple(DriveBit const &single) DriveBitMultiple(DriveBit const &single);
{
multiple_.emplace(single);
}
pool<DriveBit> const &multiple() const { return multiple_; } pool<DriveBit> const &multiple() const { return multiple_; }
@ -467,6 +464,11 @@ public:
}; };
inline DriveBitMultiple::DriveBitMultiple() {}
inline DriveBitMultiple::DriveBitMultiple(DriveBit const &single)
{
multiple_.emplace(single);
}
struct DriveChunkWire struct DriveChunkWire
{ {
@ -626,10 +628,7 @@ private:
public: public:
pool<DriveChunk> const &multiple() const { return multiple_; } pool<DriveChunk> const &multiple() const { return multiple_; }
DriveChunkMultiple(DriveBitMultiple const &bit) : width_(1) { DriveChunkMultiple(DriveBitMultiple const &bit);
for (auto const &bit : bit.multiple())
multiple_.emplace(bit);
}
int size() const { return width_; } int size() const { return width_; }
@ -1030,6 +1029,13 @@ public:
} }
}; };
inline DriveChunkMultiple::DriveChunkMultiple(DriveBitMultiple const &bit)
: width_(1)
{
for (auto const &bit : bit.multiple())
multiple_.emplace(bit);
}
struct DriveSpec struct DriveSpec
{ {
private: private: