bug-ncurses
[Top][All Lists]
Advanced

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

Re: Fix build breaks in ncurses c++ binding


From: Adam Jiang
Subject: Re: Fix build breaks in ncurses c++ binding
Date: Sun, 3 Aug 2014 11:37:26 +0900

Em…that was not true for the second issue. I can still get error message with 
code

=======
class UserData;
typedef NCursesUserPanel<UserData> UserPanel;
UserPanel *p = new UserPanel();
=======


In file included from src/cui.cpp:26:
In file included from src/cui.hpp:31:
In file included from /usr/local/opt/ncurses/include/ncursesw/cursesm.h:39:
/usr/local/opt/ncurses/include/ncursesw/cursesp.h:247:16: error: const_cast 
from 'const PowerData *' to 'void *' is not allowed
      set_user(const_cast<void *>(p_UserData));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cui.cpp:141:30: note: in instantiation of member function 
'NCursesUserPanel<PowerData>::NCursesUserPanel' requested here
  PowerMonitorPanel *p = new PowerMonitorPanel();



having ‘const_cast’ to convert ’T*’ to ‘void*’ is not a good choice no matter 
if compiler support this.

We need this patch.

Attachment: 0001-Fix-errors-in-type-conversion.patch
Description: Binary data



On 2014年8月3日, at 上午11:00, Adam Jiang <address@hidden> wrote:

> I am working on the tall ball of 5.9 release.
> 
> It seems that these issues mentioned in previous message have been fixed up 
> in development source.
> 
> On 2014年8月2日, at 下午10:24, Thomas Dickey <address@hidden> wrote:
> 
>> On Sat, Aug 02, 2014 at 08:33:21AM -0400, Thomas Dickey wrote:
>>> On Sat, Aug 02, 2014 at 12:13:50PM +0900, Adam Jiang wrote:
>>>> It’s gcc shipped with Xcode.
>>>> 
>>>> $ gcc --version
>>>> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
>>>> --with-gxx-include-dir=/usr/include/c++/4.2.1
>>>> Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
>>>> Target: x86_64-apple-darwin13.3.0
>>>> Thread model: posix
>>> 
>>> no... that's clang (someone should give the Apple developers a clue).
>>> 
>>> Actually, I have that version here, but haven't seen those warnings.
>> 
>> ...I am of course referring to current development source, found here:
>> 
>>      http://invisible-island.net/datafiles/current/ncurses.tar.gz
>> 
>> -- 
>> Thomas E. Dickey <address@hidden>
>> http://invisible-island.net
>> ftp://invisible-island.net
> 


reply via email to

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