[Kde-pim] [patch] make gpgme++ portable to msvc

Adriaan de Groot groot at kde.org
Mon Dec 10 15:27:15 GMT 2007


On Sunday 09 December 2007, Jarosław Staniek wrote:
> > Ie. remove
> >  operator unsigned int() const
> > , and keep
> >  operator undefined-bool-type() const
> > ?
>
> OK, then I hope so (I thought it's a porblem with safe_bool_dummy itself.
>
> Adriaan, then may I propose you to try the gpgmepp.patch ?

I applied the following locally:

--- gpgme++/result.h.orig       (revision 746896)
+++ gpgme++/result.h    (working copy)
@@ -33,6 +33,7 @@
   class GPGMEPP_EXPORT Result {
   protected:
     explicit Result( int error=0 ) : mError( error ) {}
+    explicit Result( Error error ) : mError( error ) {}

     void swap( Result & other ) { std::swap( other.mError, mError ); }

--- gpgme++/error.h.orig        (revision 746896)
+++ gpgme++/error.h     (working copy)
@@ -41,7 +41,7 @@

     bool isCanceled() const;

-    operator unsigned int() const { return mErr; }
+    // operator unsigned int() const { return mErr; }

   private:
     struct __safe_bool_dummy__ { void nonnull() {} };


That looks compatible with what you're proposing, which removes operator 
int(), so I'd say go ahead.

-- 
These are your friends - Adem
    GPG: FEA2 A3FE Adriaan de Groot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20071210/1d077679/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list