Rosen Penev wrote:
The problem seems to be that your implementation does not provide an
implicit default constructor, as the C++ standard seems to require for
class Sblock.
Right. I've seen similar issues in other projects but not quite like this.
Thanks for reporting this.
I have read the C++ standard again, and it seems that a default
constructor is implicitly declared only if there is no user-declared
constructor. The fix is trivial and will be in the next release of ddrescue:
--- block.h~ 2019-01-22 22:56:14.0000
+++ block.h 2019-03-28 17:24:41.0000
@@ -35,6 +35,7 @@
{ if( size_ < 0 || size_ > LLONG_MAX - pos_ ) size_ = LLONG_MAX -
pos_; }
public:
+ Block() {} // default constructor
Block( const long long p, const long long s ) : pos_( p ), size_( s )
{ if( p < 0 ) { pos_ = 0; if( s > 0 ) size_ -= std::min( s, -p ); }
fix_size(); }
@@ -103,6 +104,7 @@
Status status_;
public:
+ Sblock() {} // default constructor
Sblock( const Block & b, const Status st )
: Block( b ), status_( st ) {}
Sblock( const long long p, const long long s, const Status st )
Best regards,
Antonio.
_______________________________________________
Bug-ddrescue mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ddrescue