Skip to content

Clean up dedents in standard library references #5667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions docs/standard-library/allocator-class.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: allocator Class"
title: "allocator Class"
ms.date: "11/04/2016"
description: "Learn more about: allocator Class"
ms.date: 11/04/2016
f1_keywords: ["memory/std::allocator", "memory/std::allocator::const_pointer", "memory/std::allocator::const_reference", "memory/std::allocator::difference_type", "memory/std::allocator::pointer", "memory/std::allocator::reference", "memory/std::allocator::size_type", "memory/std::allocator::value_type", "memory/std::allocator::address", "memory/std::allocator::allocate", "memory/std::allocator::construct", "memory/std::allocator::deallocate", "memory/std::allocator::destroy", "memory/std::allocator::max_size", "memory/std::allocator::rebind"]
helpviewer_keywords: ["std::allocator [C++]", "std::allocator [C++], const_pointer", "std::allocator [C++], const_reference", "std::allocator [C++], difference_type", "std::allocator [C++], pointer", "std::allocator [C++], reference", "std::allocator [C++], size_type", "std::allocator [C++], value_type", "std::allocator [C++], address", "std::allocator [C++], allocate", "std::allocator [C++], construct", "std::allocator [C++], deallocate", "std::allocator [C++], destroy", "std::allocator [C++], max_size", "std::allocator [C++], rebind"]
ms.assetid: 3fd58076-56cc-43bb-ad58-b4b7c9c6b410
---
# allocator Class

Expand Down Expand Up @@ -396,7 +395,7 @@ int main( )
// vcref = 150;
// but the value of the first element could be modified through
// its nonconst iterator and the const reference would remain valid
*vfIter = 175;
*vfIter = 175;
cout << "The value of the element referred to by vcref,"
<<"\n after nofication through its nonconst iterator, is: "
<< vcref << "." << endl;
Expand Down Expand Up @@ -1024,7 +1023,7 @@ int main( )

vfIter = v.begin( );
allocator<double>::value_type vecVal = 150.0;
*vfIter = vecVal;
*vfIter = vecVal;
cout << "The value of the element addressed by vfIter is: "
<< *vfIter << ",\n the first element in the vector." << endl;

Expand Down
19 changes: 9 additions & 10 deletions docs/standard-library/back-insert-iterator-class.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: back_insert_iterator Class"
title: "back_insert_iterator Class"
description: "Learn more about: back_insert_iterator Class"
ms.date: 06/07/2022
f1_keywords: ["iterator/std::back_insert_iterator", "iterator/std::back_insert_iterator::container_type", "iterator/std::back_insert_iterator::reference"]
helpviewer_keywords: ["std::back_insert_iterator [C++]", "std::back_insert_iterator [C++], container_type", "std::back_insert_iterator [C++], reference"]
ms.assetid: a1ee07f2-cf9f-46a1-8608-cfaf207f9713
ms.custom: devdivchpfy22
---
# back_insert_iterator Class
Expand Down Expand Up @@ -103,9 +102,9 @@ int main( )

// Alternatively, insertions can be done with template function
back_insert_iterator<vector<int> > backiter ( vec );
*backiter = 600;
*backiter = 600;
backiter++;
*backiter = 700;
*backiter = 700;

cout << "After the insertions, the vector vec is: ( ";
for ( vIter = vec.begin ( ) ; vIter != vec.end ( ); vIter++)
Expand Down Expand Up @@ -216,9 +215,9 @@ int main( )
cout << ")." << endl;

back_insert_iterator<vector<int> > backiter ( vec );
*backiter = 10;
*backiter = 10;
backiter++; // Increment to the next element
*backiter = 20;
*backiter = 20;
backiter++;

cout << "After the insertions, the vector vec becomes: ( ";
Expand Down Expand Up @@ -277,9 +276,9 @@ int main( )
cout << ")." << endl;

back_insert_iterator<vector<int> > backiter ( vec );
*backiter = 30;
*backiter = 30;
backiter++; // Increment to the next element
*backiter = 40;
*backiter = 40;
backiter++;

cout << "After the insertions, the vector vec becomes: ( ";
Expand Down Expand Up @@ -349,9 +348,9 @@ int main( )
cout << ")." << endl;

back_insert_iterator<vector<int> > backiter ( vec );
*backiter = 10;
*backiter = 10;
backiter++; // Increment to the next element
*backiter = 20;
*backiter = 20;
backiter++;

cout << "After the insertions, the vector vec becomes: ( ";
Expand Down
2 changes: 1 addition & 1 deletion docs/standard-library/basic-string-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ int main( ) {
cout << "The full original string str1 is: " << str1 << endl;

// The dereferenced iterator can be used to modify a character
*str1_Iter = 'G';
*str1_Iter = 'G';
cout << "The first character of the modified str1 is now: "
<< *str1_Iter << endl;
cout << "The full modified string str1 is now: " << str1 << endl;
Expand Down
6 changes: 3 additions & 3 deletions docs/standard-library/deque-class.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "deque Class"
description: "Learn more about: deque Class"
ms.date: "11/04/2016"
ms.date: 11/04/2016
f1_keywords: ["deque/std::deque", "deque/std::deque::allocator_type", "deque/std::deque::const_iterator", "deque/std::deque::const_pointer", "deque/std::deque::const_reference", "deque/std::deque::const_reverse_iterator", "deque/std::deque::difference_type", "deque/std::deque::iterator", "deque/std::deque::pointer", "deque/std::deque::reference", "deque/std::deque::reverse_iterator", "deque/std::deque::size_type", "deque/std::deque::value_type", "deque/std::deque::assign", "deque/std::deque::at", "deque/std::deque::back", "deque/std::deque::begin", "deque/std::deque::cbegin", "deque/std::deque::cend", "deque/std::deque::clear", "deque/std::deque::crbegin", "deque/std::deque::crend", "deque/std::deque::emplace", "deque/std::deque::emplace_back", "deque/std::deque::emplace_front", "deque/std::deque::empty", "deque/std::deque::end", "deque/std::deque::erase", "deque/std::deque::front", "deque/std::deque::get_allocator", "deque/std::deque::insert", "deque/std::deque::max_size", "deque/std::deque::pop_back", "deque/std::deque::pop_front", "deque/std::deque::push_back", "deque/std::deque::push_front", "deque/std::deque::rbegin", "deque/std::deque::rend", "deque/std::deque::resize", "deque/std::deque::shrink_to_fit", "deque/std::deque::size", "deque/std::deque::swap"]
helpviewer_keywords: ["std::deque [C++]", "std::deque [C++], allocator_type", "std::deque [C++], const_iterator", "std::deque [C++], const_pointer", "std::deque [C++], const_reference", "std::deque [C++], const_reverse_iterator", "std::deque [C++], difference_type", "std::deque [C++], iterator", "std::deque [C++], pointer", "std::deque [C++], reference", "std::deque [C++], reverse_iterator", "std::deque [C++], size_type", "std::deque [C++], value_type", "std::deque [C++], assign", "std::deque [C++], at", "std::deque [C++], back", "std::deque [C++], begin", "std::deque [C++], cbegin", "std::deque [C++], cend", "std::deque [C++], clear", "std::deque [C++], crbegin", "std::deque [C++], crend", "std::deque [C++], emplace", "std::deque [C++], emplace_back", "std::deque [C++], emplace_front", "std::deque [C++], empty", "std::deque [C++], end", "std::deque [C++], erase", "std::deque [C++], front", "std::deque [C++], get_allocator", "std::deque [C++], insert", "std::deque [C++], max_size", "std::deque [C++], pop_back", "std::deque [C++], pop_front", "std::deque [C++], push_back", "std::deque [C++], push_front", "std::deque [C++], rbegin", "std::deque [C++], rend", "std::deque [C++], resize", "std::deque [C++], shrink_to_fit", "std::deque [C++], size", "std::deque [C++], swap"]
---
Expand Down Expand Up @@ -354,7 +354,7 @@ int main( )
c1_Iter = c1.begin( );
cout << "The first element of c1 is " << *c1_Iter << endl;

*c1_Iter = 20;
*c1_Iter = 20;
c1_Iter = c1.begin( );
cout << "The first element of c1 is now " << *c1_Iter << endl;

Expand Down Expand Up @@ -1604,7 +1604,7 @@ template<typename MyDeque> struct S<MyDeque&&> {
MyDeque::const_iterator iter;
for (iter = d.cbegin(); iter != d.cend(); iter++)
cout << *iter << " ";
cout << " via unnamed rvalue reference " << endl;
cout << " via unnamed rvalue reference " << endl;
}
};

Expand Down
15 changes: 7 additions & 8 deletions docs/standard-library/front-insert-iterator-class.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: front_insert_iterator Class"
title: "front_insert_iterator Class"
description: "Learn more about: front_insert_iterator Class"
ms.date: 06/15/2022
f1_keywords: ["iterator/std::front_insert_iterator", "iterator/std::front_insert_iterator::container_type", "iterator/std::front_insert_iterator::reference"]
helpviewer_keywords: ["std::front_insert_iterator [C++]", "std::front_insert_iterator [C++], container_type", "std::front_insert_iterator [C++], reference"]
ms.assetid: a9a9c075-136a-4419-928b-c4871afa033c
ms.custom: devdivchpfy22
---

Expand Down Expand Up @@ -254,11 +253,11 @@ int main( )

list<int> L1;
front_insert_iterator<list<int> > iter ( L1 );
*iter = 10;
*iter = 10;
iter++;
*iter = 20;
*iter = 20;
iter++;
*iter = 30;
*iter = 30;
iter++;

list <int>::iterator vIter;
Expand Down Expand Up @@ -316,11 +315,11 @@ int main( )

list<int> L1;
front_insert_iterator<list<int> > iter ( L1 );
*iter = 10;
*iter = 10;
iter++;
*iter = 20;
*iter = 20;
iter++;
*iter = 30;
*iter = 30;
iter++;

list <int>::iterator vIter;
Expand Down
6 changes: 3 additions & 3 deletions docs/standard-library/insert-iterator-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ int main( )
cout << ")." << endl;

insert_iterator<vector<int> > ii ( vec, vec.begin ( ) );
*ii = 30;
*ii = 30;
ii++;
*ii = 40;
*ii = 40;
ii++;
*ii = 50;
*ii = 50;

cout << "After the insertions, the vector vec becomes:\n ( ";
for ( vIter = vec.begin ( ) ; vIter != vec.end ( ); vIter++ )
Expand Down
5 changes: 2 additions & 3 deletions docs/standard-library/istreambuf-iterator-class.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: istreambuf_iterator Class"
title: "istreambuf_iterator Class"
description: "Learn more about: istreambuf_iterator Class"
ms.date: 06/15/2022
f1_keywords: ["streambuf/std::istreambuf_iterator", "iterator/std::istreambuf_iterator::char_type", "iterator/std::istreambuf_iterator::int_type", "iterator/std::istreambuf_iterator::istream_type", "iterator/std::istreambuf_iterator::streambuf_type", "iterator/std::istreambuf_iterator::traits_type", "iterator/std::istreambuf_iterator::equal"]
helpviewer_keywords: ["std::istreambuf_iterator [C++]", "std::istreambuf_iterator [C++], char_type", "std::istreambuf_iterator [C++], int_type", "std::istreambuf_iterator [C++], istream_type", "std::istreambuf_iterator [C++], streambuf_type", "std::istreambuf_iterator [C++], traits_type", "std::istreambuf_iterator [C++], equal"]
ms.assetid: 39002da2-61a6-48a5-9d0c-5df8271f6038
ms.custom: devdivchpfy22
---

Expand Down Expand Up @@ -341,7 +340,7 @@ int main( )
ostreambuf_iterator<char> outpos ( cout );
while ( inpos != endpos )
{
*outpos = *inpos;
*outpos = *inpos;
++inpos; //Increment istreambuf_iterator
++outpos;
}
Expand Down
9 changes: 4 additions & 5 deletions docs/standard-library/less-struct.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: less Struct"
title: "less Struct"
ms.date: "11/04/2016"
description: "Learn more about: less Struct"
ms.date: 11/04/2016
f1_keywords: ["functional/std::less"]
helpviewer_keywords: ["less struct", "less function"]
ms.assetid: 39349da3-11cd-4774-b2cc-b46af5aae5d7
---
# less Struct

Expand Down Expand Up @@ -80,15 +79,15 @@ int main() {

cout << "Original vector v1 = ( " ;
for ( Iter1 = v1.begin() ; Iter1 != v1.end() ; Iter1++ )
cout << Iter1->m_i << " ";
cout << Iter1->m_i << " ";
cout << ")" << endl;

// To sort in ascending order,
sort( v1.begin( ), v1.end( ), less<MyStruct>());

cout << "Sorted vector v1 = ( " ;
for ( Iter1 = v1.begin() ; Iter1 != v1.end() ; Iter1++ )
cout << Iter1->m_i << " ";
cout << Iter1->m_i << " ";
cout << ")" << endl;
}
```
Expand Down
11 changes: 5 additions & 6 deletions docs/standard-library/list-class.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: list Class"
title: "list Class"
ms.date: "11/04/2016"
description: "Learn more about: list Class"
ms.date: 11/04/2016
f1_keywords: ["list/std::list", "list/std::list::allocator_type", "list/std::list::const_iterator", "list/std::list::const_pointer", "list/std::list::const_reference", "list/std::list::const_reverse_iterator", "list/std::list::difference_type", "list/std::list::iterator", "list/std::list::pointer", "list/std::list::reference", "list/std::list::reverse_iterator", "list/std::list::size_type", "list/std::list::value_type", "list/std::list::assign", "list/std::list::back", "list/std::list::begin", "list/std::list::cbegin", "list/std::list::cend", "list/std::list::clear", "list/std::list::crbegin", "list/std::list::crend", "list/std::list::emplace", "list/std::list::emplace_back", "list/std::list::emplace_front", "list/std::list::empty", "list/std::list::end", "list/std::list::erase", "list/std::list::front", "list/std::list::get_allocator", "list/std::list::insert", "list/std::list::max_size", "list/std::list::merge", "list/std::list::pop_back", "list/std::list::pop_front", "list/std::list::push_back", "list/std::list::push_front", "list/std::list::rbegin", "list/std::list::remove", "list/std::list::remove_if", "list/std::list::rend", "list/std::list::resize", "list/std::list::reverse", "list/std::list::size", "list/std::list::sort", "list/std::list::splice", "list/std::list::swap", "list/std::list::unique"]
helpviewer_keywords: ["std::list [C++]", "std::list [C++], allocator_type", "std::list [C++], const_iterator", "std::list [C++], const_pointer", "std::list [C++], const_reference", "std::list [C++], const_reverse_iterator", "std::list [C++], difference_type", "std::list [C++], iterator", "std::list [C++], pointer", "std::list [C++], reference", "std::list [C++], reverse_iterator", "std::list [C++], size_type", "std::list [C++], value_type", "std::list [C++], assign", "std::list [C++], back", "std::list [C++], begin", "std::list [C++], cbegin", "std::list [C++], cend", "std::list [C++], clear", "std::list [C++], crbegin", "std::list [C++], crend", "std::list [C++], emplace", "std::list [C++], emplace_back", "std::list [C++], emplace_front", "std::list [C++], empty", "std::list [C++], end", "std::list [C++], erase", "std::list [C++], front", "std::list [C++], get_allocator", "std::list [C++], insert", "std::list [C++], max_size", "std::list [C++], merge", "std::list [C++], pop_back", "std::list [C++], pop_front", "std::list [C++], push_back", "std::list [C++], push_front", "std::list [C++], rbegin", "std::list [C++], remove", "std::list [C++], remove_if", "std::list [C++], rend", "std::list [C++], resize", "std::list [C++], reverse", "std::list [C++], size", "std::list [C++], sort", "std::list [C++], splice", "std::list [C++], swap", "std::list [C++], unique"]
ms.assetid: d3707f4a-10fd-444f-b856-f9ca2077c1cd
---
# `list` Class

Expand Down Expand Up @@ -303,7 +302,7 @@ int main( )
c1_Iter = c1.begin( );
cout << "The first element of c1 is " << *c1_Iter << endl;

*c1_Iter = 20;
*c1_Iter = 20;
c1_Iter = c1.begin( );
cout << "The first element of c1 is now " << *c1_Iter << endl;

Expand Down Expand Up @@ -851,7 +850,7 @@ int main( )
cout << "The last integer of c1 is " << *c1_Iter << endl;

c1_Iter--;
*c1_Iter = 400;
*c1_Iter = 400;
cout << "The new next-to-last integer of c1 is "
<< *c1_Iter << endl;

Expand Down Expand Up @@ -1754,7 +1753,7 @@ int main( )
cout << endl;

c1_rIter = c1.rbegin( );
*c1_rIter = 40;
*c1_rIter = 40;
cout << "The last element in the list is now " << *c1_rIter << "." << endl;
}
```
Expand Down
7 changes: 4 additions & 3 deletions docs/standard-library/locale-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -903,9 +903,10 @@ int main( )
{
locale loc1 ( "German_Germany" ), loc2 ( "English_Australia" );
bool result1 = use_facet<ctype<char> > ( loc1 ).is(
ctype_base::alpha, 'a'
);
bool result2 = use_facet<ctype<char> > ( loc2 ).is( ctype_base::alpha, '!'
ctype_base::alpha, 'a'
);
bool result2 = use_facet<ctype<char> > ( loc2 ).is(
ctype_base::alpha, '!'
);

if ( result1 )
Expand Down
25 changes: 12 additions & 13 deletions docs/standard-library/ostream-iterator-class.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: ostream_iterator Class"
title: "ostream_iterator Class"
description: "Learn more about: ostream_iterator Class"
ms.date: 06/17/2022
f1_keywords: ["iterator/std::ostream_iterator", "iterator/std::ostream_iterator::char_type", "iterator/std::ostream_iterator::ostream_type", "iterator/std::ostream_iterator::traits_type"]
helpviewer_keywords: ["std::ostream_iterator [C++]", "std::ostream_iterator [C++], char_type", "std::ostream_iterator [C++], ostream_type", "std::ostream_iterator [C++], traits_type"]
ms.assetid: 24d842d3-9f45-4bf6-a697-62f5968f5a03
ms.custom: devdivchpfy22
---

Expand Down Expand Up @@ -145,10 +144,10 @@ int main( )
// Standard iterator interface for writing
// elements to the output stream
cout << "Elements written to output stream:" << endl;
*intOut = 10;
*intOut = 10;
intOut++; // No effect on iterator position
*intOut = 20;
*intOut = 30;
*intOut = 20;
*intOut = 30;
}
/* Output:
Elements written to output stream:
Expand Down Expand Up @@ -195,10 +194,10 @@ int main( )
// standard iterator interface for writing
// elements to the output stream
cout << "Elements written to output stream:" << endl;
*intOut = 10;
*intOut = 10;
intOut++; // No effect on iterator position
*intOut = 20;
*intOut = 30;
*intOut = 20;
*intOut = 30;
}
/* Output:
Elements written to output stream:
Expand Down Expand Up @@ -249,10 +248,10 @@ int main( )
// Standard iterator interface for writing
// elements to the output stream
cout << "Elements written to output stream:" << endl;
*intOut = 10;
*intOut = 10;
intOut++; // No effect on iterator position
*intOut = 20;
*intOut = 30;
*intOut = 20;
*intOut = 30;
}
/* Output:
Elements written to output stream:
Expand Down Expand Up @@ -304,9 +303,9 @@ int main( )

// ostream_iterator for stream cout
ostream_iterator<int> intOut ( cout , "\n" );
*intOut = 10;
*intOut = 10;
intOut++;
*intOut = 20;
*intOut = 20;
intOut++;

int i;
Expand Down
Loading