You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Elmar Zander (JIRA)" <ji...@apache.org> on 2008/09/26 13:11:44 UTC
[jira] Created: (STDCXX-1017) Example for bind1st is wrong
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.
[jira] Updated: (STDCXX-1017) Example for bind1st is wrong
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor updated STDCXX-1017:
---------------------------------
Component/s: (was: Web Site)
Documentation
Affects Version/s: 4.2.1
Fix Version/s: 4.2.2
Affects 4.2.1 and prior. Will fix in 4.2.2.
> 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: Documentation
> Affects Versions: 4.2.1
> Reporter: Elmar Zander
> Assignee: Martin Sebor
> Priority: Minor
> Fix For: 4.2.2
>
>
> 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 last sentence should of course read: This function adds one to littleNums each time the element is less than 7.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (STDCXX-1017) Example for bind1st is wrong
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor closed STDCXX-1017.
--------------------------------
Resolution: Fixed
Fixed in [r699389|http://svn.apache.org/viewcvs?view=rev&rev=699389].
Merged to 4.3.x and trunk in [r699393|http://svn.apache.org/viewcvs?view=rev&rev=699393] and [r699397|http://svn.apache.org/viewcvs?view=rev&rev=699397], respectively.
Please reopen if you see a problem with the changes.
> 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: Documentation
> Affects Versions: 4.2.1
> Reporter: Elmar Zander
> Assignee: Martin Sebor
> Priority: Minor
> Fix For: 4.2.2
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> 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 last sentence should of course read: This function adds one to littleNums each time the element is less than 7.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (STDCXX-1017) Example for bind1st is wrong
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor reassigned STDCXX-1017:
------------------------------------
Assignee: Martin Sebor
> 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: Documentation
> Affects Versions: 4.2.1
> Reporter: Elmar Zander
> Assignee: Martin Sebor
> Priority: Minor
> Fix For: 4.2.2
>
>
> 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 last sentence should of course read: This function adds one to littleNums each time the element is less than 7.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (STDCXX-1017) Example for bind1st is wrong
Posted by "Elmar Zander (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Elmar Zander updated STDCXX-1017:
---------------------------------
Description:
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 last sentence should of course read: This function adds one to littleNums each time the element is less than 7.
was:
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))
> 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 last sentence should of course read: This function adds one to littleNums each time the element is less than 7.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.