[Top][All Lists]

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

Re: Fix build breaks in ncurses c++ binding

From: Thomas Dickey
Subject: Re: Fix build breaks in ncurses c++ binding
Date: Sun, 03 Aug 2014 06:38:20 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Aug 03, 2014 at 11:37:26AM +0900, Adam Jiang wrote:
> 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.

yes: but my policy is to verify changes where I have a comparable environment.
As I pointed out, the compiler on my machine gives the same version information.

In my tests, I had no warnings.  So what I am looking for is details on how
to reproduce the problem you are proposing to fix.

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

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