Example for bind1st is wrong ---------------------------- Key: STDCXX-1017 URL: https://issues.apache.org/jira/browse/STDCXX-1017 Project: C++ Standard Library Issue Type: Bug Components: Web Site Reporter: Elmar Zander Priority: Minor
In the description of bind1st it says the following (http://stdcxx.apache.org/doc/stdlibref/bind1st.html): "For example, you could use the count_if() algorithm to count all elements in a vector that are less than or equal to 7, using the following: vector<int> v; int littleNums; count_if(v.begin, v.end, bind1st(greater<int>(),7), littleNums) This function adds one to littleNums each time the element is greater than 7." The first sentence contradicts the last (which is true, in this case), but on the other what the code snippet does doesn't correspond to the variable name "littleNums". Either ((use bind2nd || use less<int>) && (change the last sentence)) or ((s/littleNums/bigNums/g) && (change the first sentence)) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.