Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » deprecated function encountered
deprecated function encountered [message #56405] Mon, 08 March 2021 14:17 Go to next message
sinpeople is currently offline  sinpeople
Messages: 29
Registered: October 2020
Location: Singapore
Promising Member

Hi folks,

Good day to you!
I got this error "warning: 'bind1st<std::__1::multiplies<double>, int>' is deprecated [-Wdeprecated-declarations]" during compiling. I didn't get the expected results as I wish.

The code is very simple like below.

effectiveGreen = 94;
signalPlan.Clear();
signalPlan.Reserve(split.size());
transform(split.begin(), split.end(), signalPlan.begin(), bind1st(multiplies<double>(),double(effectiveGreen)));


The two vector are all Vector<double>. I didn't get correct results in "signalPlan".

Many thanks. I want all elements in "split" to be multiply "effectiveGreen" and stored in "signalPlan" in the same order.

Appreciate your help.


Best Regards
David
Re: deprecated function encountered [message #56406 is a reply to message #56405] Mon, 08 March 2021 15:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
https://stackoverflow.com/questions/52769059/replacement-for -removed-bind1st-in-c17
Re: deprecated function encountered [message #56407 is a reply to message #56406] Mon, 08 March 2021 16:00 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
P.S.: Not sure what version of TheIDE you are using and when that feature was added, but it has now a nice function just for this case: You can directly google error message (right click it).
Previous Topic: Compile time hash macro
Next Topic: Multiply a scalar to every element of a vector
Goto Forum:
  


Current Time: Fri Mar 29 16:58:21 CET 2024

Total time taken to generate the page: 0.00962 seconds