You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Boris Dolgov <bo...@dolgov.name> on 2016/05/29 15:33:29 UTC

uima-cpp C++11 support

Hello!

Currently, it is impossible to include uima-cpp headers in a c++11
program with the following error:
include/uima/strtools.hpp: 731: std::istream has no member named
'operator void*()'

This member has been changed in C++11:
http://www.cplusplus.com/reference/ios/ios/operator_bool/ . Explicit
operator overloading allows not to use the hack with operator void*()
anymore.

Anyway, both operator bool() and operator void*() can be invoked using
simple if statement, the compiler will pick the correct operator
itself.

Please, see my patch attached. It fixes the issue with C++11 compilers
and works with C++98 compilers.

Best regards,
Boris Dolgov.

Re: uima-cpp C++11 support

Posted by Eddie Epstein <ea...@gmail.com>.
Hi Boris,

Thanks for the information. We are [slowly] working on a new uimacpp
release so this will be included. FYI, attachments are not delivered to
this mail list .. can you either reply with the patch, or create a jira and
attach the patch there?

Many thanks,
Eddie

On Sun, May 29, 2016 at 11:33 AM, Boris Dolgov <bo...@dolgov.name> wrote:

> Hello!
>
> Currently, it is impossible to include uima-cpp headers in a c++11
> program with the following error:
> include/uima/strtools.hpp: 731: std::istream has no member named
> 'operator void*()'
>
> This member has been changed in C++11:
> http://www.cplusplus.com/reference/ios/ios/operator_bool/ . Explicit
> operator overloading allows not to use the hack with operator void*()
> anymore.
>
> Anyway, both operator bool() and operator void*() can be invoked using
> simple if statement, the compiler will pick the correct operator
> itself.
>
> Please, see my patch attached. It fixes the issue with C++11 compilers
> and works with C++98 compilers.
>
> Best regards,
> Boris Dolgov.
>