> -----Ursprüngliche Nachricht----- > Von: Steven G. Johnson [mailto:[email protected]] > Gesendet: Montag, 24. Juni 2013 18:36 > An: [email protected] > Cc: Florian Dommert > Betreff: Re: [NLopt-discuss] unsigned vs size_t in add_constraints > > > On Jun 22, 2013, at 1:41 AM, "Florian Dommert" <[email protected] > stuttgart.de> wrote: > > > Hello, > > > > a few weeks ago I discovered nlopt. It is really a very useful library. > > Currently I use it to implement some programs in C++ under Windows. I > > have been using nlopt under a 32bit target system and everything worked fine. > > However, compiling on a 64bit architecture gives some warnings, > > because the add_constraints and similar C++ wrappers take amongst > > others an unsigned argument m. In the wrapper, this m is given by the > > size of an object with opt.size(), which results in an size_t kind of > > variable, which might have larger values than an unsigned int in case of a 64bit > compilation. > > > It is not really practical to use NLopt with more than 2^32-1 constraints (max > unsigned), so I would just ignore the compiler warnings.
Hi, this is surely true, but warnings are annoying in a nice clean code. Are you interested in a patch? Perhaps I can work one out without affecting the general behavior. Cheers, Flo _______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
