Skip to content

Commit 1e76aee

Browse files
author
Colin Robertson
committed
Fix F1 keywords, dates
1 parent a35c6fc commit 1e76aee

33 files changed

+125
-125
lines changed

docs/standard-library/binary-negate-class.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: "binary_negate Class"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::binary_negate"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::binary_negate"]
55
helpviewer_keywords: ["binary_negate class"]
66
ms.assetid: 7b86f02c-af7e-4c7f-9df1-08addae4dd65
77
---
88
# binary_negate Class
99

10-
A template class providing a member function that negates the return value of a specified binary function. Deprecated in C++17.
10+
A template class providing a member function that negates the return value of a specified binary function. Deprecated in C++17 in favor of [not_fn](functional-functions.md#not_fn).
1111

1212
## Syntax
1313

docs/standard-library/binder1st-class.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: "binder1st Class"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::binder1st"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::binder1st"]
55
helpviewer_keywords: ["binder1st class"]
66
ms.assetid: 6b8ee343-c82f-48f8-867d-06f9d1d324c0
77
---
88
# binder1st Class
99

10-
A template class providing a constructor that converts a binary function object into a unary function object by binding the first argument of the binary function to a specified value. Deprecated in C++11, removed in C++17.
10+
A template class providing a constructor that converts a binary function object into a unary function object by binding the first argument of the binary function to a specified value. Deprecated in C++11 in favor of [bind](functional-functions.md#bind), and removed in C++17.
1111

1212
## Syntax
1313

@@ -21,7 +21,7 @@ public:
2121
typedef typename Operation::argument_type argument_type;
2222
typedef typename Operation::result_type result_type;
2323
binder1st(
24-
const Operation& Func,
24+
const Operation& binary_fn,
2525
const typename Operation::first_argument_type& left);
2626

2727
result_type operator()(const argument_type& right) const;
@@ -35,7 +35,7 @@ protected:
3535

3636
### Parameters
3737

38-
*Func*<br/>
38+
*binary_fn*<br/>
3939
The binary function object to be converted to a unary function object.
4040

4141
*left*<br/>
@@ -50,9 +50,9 @@ The unary function object that results from binding the first argument of the bi
5050

5151
## Remarks
5252

53-
The template class stores a copy of a binary function object *Func* in `op`, and a copy of *left* in `value`. It defines its member function `operator()` as returning **op**( **value**, `right`).
53+
The template class stores a copy of a binary function object *binary_fn* in `op`, and a copy of *left* in `value`. It defines its member function `operator()` as returning `op( value, right )`.
5454

55-
If *Func* is an object of type `Operation` and `c` is a constant , then [bind1st](../standard-library/functional-functions.md#bind1st) ( `Func`, `c` ) is equivalent to the `binder1st` class constructor `binder1st`\< **Operation**> ( `Func`, `c` ) and more convenient.
55+
If *binary_fn* is an object of type `Operation` and `c` is a constant, then `bind1st( binary_fn, c )` is a more convenient equivalent to `binder1st<Operation>( binary_fn, c )`. For more information, see [bind1st](../standard-library/functional-functions.md#bind1st).
5656

5757
## Example
5858

docs/standard-library/binder2nd-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "binder2nd Class"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::binder2nd"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::binder2nd"]
55
helpviewer_keywords: ["binder2nd class"]
66
ms.assetid: b2a9c1d1-dfc4-4ca9-a10e-ae84e195a62d
77
---

docs/standard-library/const-mem-fun-ref-t-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "const_mem_fun_ref_t Class"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::const_mem_fun_ref_t"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::const_mem_fun_ref_t"]
55
helpviewer_keywords: ["const_mem_fun_ref_t class"]
66
ms.assetid: 316ddbaa-9f46-4931-8eba-ea4ca66360ef
77
---

docs/standard-library/const-mem-fun-t-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "const_mem_fun_t Class"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::const_mem_fun_t"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::const_mem_fun_t"]
55
helpviewer_keywords: ["const_mem_fun_t class"]
66
ms.assetid: f169d381-019b-4a0e-a9a3-54da6d948270
77
---

docs/standard-library/const-mem-fun1-ref-t-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "const_mem_fun1_ref_t Class"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::const_mem_fun1_ref_t"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::const_mem_fun1_ref_t"]
55
helpviewer_keywords: ["const_mem_fun1_ref_t class"]
66
ms.assetid: 8220d373-fa1c-44be-a21d-96d49b3ea6bb
77
---

docs/standard-library/const-mem-fun1-t-class.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "const_mem_fun1_t Class"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::const_mem_fun1_t"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::const_mem_fun1_t"]
55
helpviewer_keywords: ["const_mem_fun1_t class"]
66
ms.assetid: 250fac30-9663-4133-9051-6303f76ea259
77
---
@@ -15,33 +15,33 @@ An adapter class that allows a **const** member function that takes a single arg
1515
template <class Result, class Type, class Arg>
1616
class const_mem_fun1_t : public binary_function<const Type *, Arg, Result>
1717
{
18-
explicit const_mem_fun1_t(Result (Type::* _Pm)(Arg) const);
19-
Result operator()(const Type* _Pleft, Arg right) const;
18+
explicit const_mem_fun1_t(Result (Type::* member_ptr)(Arg) const);
19+
Result operator()(const Type* left, Arg right) const;
2020
};
2121
```
2222

2323
### Parameters
2424

25-
*_Pm*<br/>
25+
*member_ptr*<br/>
2626
A pointer to the member function of class `Type` to be converted to a function object.
2727

28-
*_Pleft*<br/>
29-
The **const** object that the *_Pm* member function is called on.
28+
*left*<br/>
29+
The **const** object that the *member_ptr* member function is called on.
3030

3131
*right*<br/>
32-
The argument that is being given to *_Pm*.
32+
The argument that is being given to *member_ptr*.
3333

3434
## Return Value
3535

3636
An adaptable binary function.
3737

3838
## Remarks
3939

40-
The template class stores a copy of *_Pm*, which must be a pointer to a member function of class `Type`, in a private member object. It defines its member function `operator()` as returning ( *_Pleft*->\*<em>Pm</em>)( *right* ) **const**.
40+
The template class stores a copy of *member_ptr*, which must be a pointer to a member function of class `Type`, in a private member object. It defines its member function `operator()` as returning `(left->member_ptr)(right) const`.
4141

4242
## Example
4343

44-
The constructor of `const_mem_fun1_t` is not usually used directly; the helper function `mem_fun` is used to adapt member functions. See [mem_fun](../standard-library/functional-functions.md#mem_fun) for an example of how to use member function adaptors.
44+
The constructor of `const_mem_fun1_t` is rarely used directly. `mem_fn` is used to adapt member functions. See [mem_fn](../standard-library/functional-functions.md#mem_fn) for an example of how to use member function adaptors.
4545

4646
## Requirements
4747

docs/standard-library/divides-struct.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "divides Struct"
33
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::divides"]
4+
f1_keywords: ["functional/std::divides"]
55
helpviewer_keywords: ["divides struct", "divides class"]
66
ms.assetid: b9cf8e9c-6981-43a6-a6a3-8f761987dd7a
77
---

docs/standard-library/equal-to-struct.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "equal_to Struct"
33
ms.date: "11/04/2016"
4-
f1_keywords: ["xfunctional/std::equal_to"]
4+
f1_keywords: ["functional/std::equal_to"]
55
helpviewer_keywords: ["equal_to function", "equal_to struct"]
66
ms.assetid: 8e4f2b50-b2db-48e3-b4cc-6cc03362c2a6
77
---

docs/standard-library/functional-functions.md

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "&lt;functional&gt; functions"
3-
ms.date: "01/17/2019"
4-
f1_keywords: ["functional/std::bind", "xfunctional/std::bind1st", "xfunctional/std::bind2nd", "xfunctional/std::bit_and", "xfunctional/std::bit_not", "xfunctional/std::bit_or", "xfunctional/std::bit_xor", "functional/std::cref", "type_traits/std::cref", "xfunctional/std::mem_fn", "xfunctional/std::mem_fun_ref", "xfunctional/std::not1", "xfunctional/std::not2", "functional/std::not_fn", "xfunctional/std::ptr_fun", "functional/std::ref", "functional/std::swap"]
3+
ms.date: "02/21/2019"
4+
f1_keywords: ["functional/std::bind", "functional/std::bind1st", "functional/std::bind2nd", "functional/std::bit_and", "functional/std::bit_not", "functional/std::bit_or", "functional/std::bit_xor", "functional/std::cref", "type_traits/std::cref", "functional/std::mem_fn", "functional/std::mem_fun_ref", "functional/std::not1", "functional/std::not2", "functional/std::not_fn", "functional/std::ptr_fun", "functional/std::ref", "functional/std::swap"]
55
helpviewer_keywords: ["std::bind [C++]", "std::bind1st", "std::bind2nd", "std::bit_and [C++]", "std::bit_not [C++]", "std::bit_or [C++]", "std::bit_xor [C++]", "std::cref [C++]"]
66
ms.assetid: c34d0b45-50a7-447a-9368-2210d06339a4
77
---
@@ -531,69 +531,6 @@ cref(i) = 1
531531
cref(neg)(i) = -1
532532
```
533533

534-
## <a name="mem_fn"></a> mem_fn
535-
536-
Generates a simple call wrapper.
537-
538-
```cpp
539-
template <class Ret, class Ty>
540-
unspecified mem_fn(Ret Ty::*pm);
541-
```
542-
543-
### Parameters
544-
545-
*Ret*<br/>
546-
The return type of the wrapped function.
547-
548-
*Ty*<br/>
549-
The type of the member function pointer.
550-
551-
### Remarks
552-
553-
The template function returns a simple call wrapper `cw`, with a weak result type, such that the expression `cw(t, a2, ..., aN)` is equivalent to `INVOKE(pm, t, a2, ..., aN)`. It does not throw any exceptions.
554-
555-
The returned call wrapper is derived from `std::unary_function<cv Ty*, Ret>` (hence defining the nested type `result_type` as a synonym for *Ret* and the nested type `argument_type` as a synonym for `cv Ty*`) only if the type *Ty* is a pointer to member function with cv-qualifier `cv` that takes no arguments.
556-
557-
The returned call wrapper is derived from `std::binary_function<cv Ty*, T2, Ret>` (hence defining the nested type `result_type` as a synonym for *Ret*, the nested type `first argument_type` as a synonym for `cv Ty*`, and the nested type `second argument_type` as a synonym for `T2`) only if the type *Ty* is a pointer to member function with cv-qualifier `cv` that takes one argument, of type `T2`.
558-
559-
### Example
560-
561-
```cpp
562-
// std__functional__mem_fn.cpp
563-
// compile with: /EHsc
564-
#include <functional>
565-
#include <iostream>
566-
567-
class Funs
568-
{
569-
public:
570-
void square(double x)
571-
{
572-
std::cout << x << "^2 == " << x * x << std::endl;
573-
}
574-
575-
void product(double x, double y)
576-
{
577-
std::cout << x << "*" << y << " == " << x * y << std::endl;
578-
}
579-
};
580-
581-
int main()
582-
{
583-
Funs funs;
584-
585-
std::mem_fn(&Funs::square)(funs, 3.0);
586-
std::mem_fn(&Funs::product)(funs, 3.0, 2.0);
587-
588-
return (0);
589-
}
590-
```
591-
592-
```Output
593-
3^2 == 9
594-
3*2 == 6
595-
```
596-
597534
## <a name="invoke"></a> invoke
598535

599536
Invokes any callable object with the given arguments. Added in C++17.
@@ -701,9 +638,72 @@ int main()
701638
}
702639
```
703640

641+
## <a name="mem_fn"></a> mem_fn
642+
643+
Generates a simple call wrapper.
644+
645+
```cpp
646+
template <class Ret, class Ty>
647+
unspecified mem_fn(Ret Ty::*pm);
648+
```
649+
650+
### Parameters
651+
652+
*Ret*<br/>
653+
The return type of the wrapped function.
654+
655+
*Ty*<br/>
656+
The type of the member function pointer.
657+
658+
### Remarks
659+
660+
The template function returns a simple call wrapper `cw`, with a weak result type, such that the expression `cw(t, a2, ..., aN)` is equivalent to `INVOKE(pm, t, a2, ..., aN)`. It does not throw any exceptions.
661+
662+
The returned call wrapper is derived from `std::unary_function<cv Ty*, Ret>` (hence defining the nested type `result_type` as a synonym for *Ret* and the nested type `argument_type` as a synonym for `cv Ty*`) only if the type *Ty* is a pointer to member function with cv-qualifier `cv` that takes no arguments.
663+
664+
The returned call wrapper is derived from `std::binary_function<cv Ty*, T2, Ret>` (hence defining the nested type `result_type` as a synonym for *Ret*, the nested type `first argument_type` as a synonym for `cv Ty*`, and the nested type `second argument_type` as a synonym for `T2`) only if the type *Ty* is a pointer to member function with cv-qualifier `cv` that takes one argument, of type `T2`.
665+
666+
### Example
667+
668+
```cpp
669+
// std__functional__mem_fn.cpp
670+
// compile with: /EHsc
671+
#include <functional>
672+
#include <iostream>
673+
674+
class Funs
675+
{
676+
public:
677+
void square(double x)
678+
{
679+
std::cout << x << "^2 == " << x * x << std::endl;
680+
}
681+
682+
void product(double x, double y)
683+
{
684+
std::cout << x << "*" << y << " == " << x * y << std::endl;
685+
}
686+
};
687+
688+
int main()
689+
{
690+
Funs funs;
691+
692+
std::mem_fn(&Funs::square)(funs, 3.0);
693+
std::mem_fn(&Funs::product)(funs, 3.0, 2.0);
694+
695+
return (0);
696+
}
697+
```
698+
699+
```Output
700+
3^2 == 9
701+
3*2 == 6
702+
```
703+
704704
## <a name="mem_fun"></a> mem_fun
705705

706-
Helper template functions used to construct function object adaptors for member functions when initialized with pointer arguments. Deprecated in C++11, removed in C++17.
706+
Helper template functions used to construct function object adaptors for member functions when initialized with pointer arguments. Deprecated in C++11 in favor of [mem_fn](#mem_fn) and [bind](#bind), and removed in C++17.
707707

708708
```cpp
709709
template <class Result, class Type>

0 commit comments

Comments
 (0)