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_;
public:
DriveBitMultiple() {}
DriveBitMultiple(DriveBit const &single)
{
multiple_.emplace(single);
}
DriveBitMultiple();
DriveBitMultiple(DriveBit const &single);
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
{
@ -626,10 +628,7 @@ private:
public:
pool<DriveChunk> const &multiple() const { return multiple_; }
DriveChunkMultiple(DriveBitMultiple const &bit) : width_(1) {
for (auto const &bit : bit.multiple())
multiple_.emplace(bit);
}
DriveChunkMultiple(DriveBitMultiple const &bit);
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
{
private: