[Ipopt-tickets] Re: [Ipopt] #38: !AddIpopt*Option char* arguments as '''const''' char*

Ipopt coin-trac at coin-or.org
Tue Jul 24 16:19:13 EDT 2007


#38: !AddIpopt*Option char* arguments as '''const''' char*
--------------------------------+-------------------------------------------
  Reporter:  rafael             |       Owner:  andreasw
      Type:  enhancement        |      Status:  assigned
  Priority:  normal             |   Component:  Ipopt   
   Version:  3.2 (C++ Version)  |    Severity:  minor   
Resolution:                     |    Keywords:          
--------------------------------+-------------------------------------------
Changes (by andreasw):

  * status:  new => assigned
  * owner:  ipopt-team => andreasw

Comment:

 Hi,

 The IpStdCInterface.h header file is meant for the C compiler interface,
 and "const" - as far as I know - is not part of ANSI C.  Therefore I would
 be hesitant to include the const keyword in a C header file.  If you are
 using a C++ compiler to handle this code, "const" will work.

 The AC_C_CONST macro could be helpful, but then we would have to include
 the config_ipopt.h file as well, and so far we were nicely able to avoid
 this for the C interface.

 Unless there are really strong reasons to make the C interface have C++
 attribute, I suggest we leave it as it is for now.

 But we can leave the ticket open as possible enhancement later.


 Thanks

 Andreas

-- 
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/38#comment:4>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list