bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] Not compiling with uclibc++


From: Antonio Diaz Diaz
Subject: Re: [Bug-ddrescue] Not compiling with uclibc++
Date: Thu, 28 Mar 2019 18:22:09 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]