Skip to content

Commit 67bc74c

Browse files
author
mtx48109
committed
link correction
1 parent 1dd7a7e commit 67bc74c

1 file changed

Lines changed: 68 additions & 1 deletion

File tree

‎docs/dotnet/vector-stl-clr.md‎

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2418,7 +2418,7 @@ int main()
24182418
[a b c] < [a b d] is True
24192419
```
24202420

2421-
## <a name="eq_lteq"></a> operator&lt;= (vector) (STL/CLR)
2421+
## <a name="op_lteq"></a> operator&lt;= (vector) (STL/CLR)
24222422
Vector less than or equal comparison.
24232423

24242424
### Syntax
@@ -2485,6 +2485,73 @@ int main()
24852485
[a b d] <= [a b c] is False
24862486
```
24872487

2488+
## <a name="op_eq"></a> operator== (vector) (STL/CLR)
2489+
Vector equal comparison.
2490+
2491+
### Syntax
2492+
2493+
```
2494+
template<typename Value>
2495+
bool operator==(vector<Value>% left,
2496+
vector<Value>% right);
2497+
```
2498+
2499+
#### Parameters
2500+
left
2501+
Left container to compare.
2502+
2503+
right
2504+
Right container to compare.
2505+
2506+
### Remarks
2507+
The operator function returns true only if the sequences controlled by `left` and `right` have the same length and, for each position `i`, `left[i] ==` `right[i]`. You use it to test whether `left` is ordered the same as `right` when the two vectors are compared element by element.
2508+
2509+
### Example
2510+
2511+
```cpp
2512+
// cliext_vector_operator_eq.cpp
2513+
// compile with: /clr
2514+
#include <cliext/vector>
2515+
2516+
int main()
2517+
{
2518+
cliext::vector<wchar_t> c1;
2519+
c1.push_back(L'a');
2520+
c1.push_back(L'b');
2521+
c1.push_back(L'c');
2522+
2523+
// display contents " a b c"
2524+
for each (wchar_t elem in c1)
2525+
System::Console::Write(" {0}", elem);
2526+
System::Console::WriteLine();
2527+
2528+
// assign to a new container
2529+
cliext::vector<wchar_t> c2;
2530+
c2.push_back(L'a');
2531+
c2.push_back(L'b');
2532+
c2.push_back(L'd');
2533+
2534+
// display contents " a b d"
2535+
for each (wchar_t elem in c2)
2536+
System::Console::Write(" {0}", elem);
2537+
System::Console::WriteLine();
2538+
2539+
System::Console::WriteLine("[a b c] == [a b c] is {0}",
2540+
c1 == c1);
2541+
System::Console::WriteLine("[a b c] == [a b d] is {0}",
2542+
c1 == c2);
2543+
return (0);
2544+
}
2545+
2546+
```
2547+
2548+
```Output
2549+
a b c
2550+
a b d
2551+
[a b c] == [a b c] is True
2552+
[a b c] == [a b d] is False
2553+
```
2554+
24882555
## <a name="op_gt"></a> operator&gt; (vector) (STL/CLR)
24892556
Vector greater than comparison.
24902557

0 commit comments

Comments
 (0)