A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://sgistl.github.io/project2nd.html below:

project2nd<Arg1, Arg2>

project2nd<Arg1, Arg2> DescriptionProject2nd is a function object that takes two arguments and returns its second argument; the first argument is unused. It is essentially a generalization of identity to the case of a Binary Function. Example
int main()
{
  vector<char*> v1(10, (char*) 0);
  vector<int> v2(10, 137);
  vector<int> result(10);

  transform(v1.begin(), v1.end(), v2.begin(), result.begin(),
            project2nd<char*, int>());
  assert(equal(v2.begin(), v2.end(), result.begin()));
}           
Definition Defined in the standard header functional, and in the nonstandard backward-compatibility header function.h. This function object is an SGI extension; it is not part of the C++ standard. Template parameters Parameter Description Default Arg1 project2nd's first argument type.   Arg2 project2nd's second argument type, and its result type.   Model ofAdaptable Binary Function Type requirements None. Public base classesbinary_function<Arg1, Arg2, Arg2> Members New members All of project2nd's members are defined in the Adaptable Binary Function requirements. project2nd does not introduce any new members. Notes See alsoFunction objects, identity, project1st, select1st, select2nd STL Main Page

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4