Skip to content

Commit 64cff4c

Browse files
authored
Merge pull request MicrosoftDocs#4652 from TylerMSFT/smallfix
smooth out how refer to range adaptors
2 parents 163876c + b6e5ea4 commit 64cff4c

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

docs/standard-library/path-class.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ description: "Learn more about: path Class"
33
title: "path Class"
44
ms.date: 06/17/2022
55
f1_keywords: ["filesystem/std::experimental::filesystem::path"]
6-
ms.custom: devdivchpfy22
76
---
87

98
# `path` Class
@@ -63,7 +62,7 @@ class path;
6362
|[`is_absolute`](#is_absolute)|For Windows, the function returns `has_root_name() && has_root_directory()`. For POSIX, the function returns `has_root_directory()`.|
6463
|[`is_relative`](#is_relative)|Returns `!is_absolute()`.|
6564
|[`make_preferred`](#make_preferred)|Converts each separator to a `preferred_separator` as needed.|
66-
|[`native`](#native)|Returns `myname`.|
65+
|[`native`](#native)|Returns the native representation of the path.|
6766
|[`parent_path`](#parent_path)|Returns the parent path component of `myname`.|
6867
|[`preferred_separator`](#preferred_separator)|The constant object gives the preferred character for separating path components, depending on the host operating system. |
6968
|[`relative_path`](#relative_path)|Returns the relative path component of `myname`. |
@@ -436,12 +435,30 @@ path& make_preferred();
436435

437436
## <a name="native"></a> `path::native`
438437

439-
Returns `myname`.
438+
Get the native string representation of the path.
440439

441440
```cpp
442441
const string_type& native() const noexcept;
443442
```
444443

444+
### Remarks
445+
446+
The path is available in a portable generic format (see [`generic_string()`](#generic_string)) or the native format of the path. This function returns the native string. On a POSIX system, the generic format and the native format are the same.
447+
448+
In the following example running on Windows 11, the generic path string is `c:/t/temp/temp.txt` and the native string is `c:\\t\\temp.txt`
449+
450+
```cpp
451+
// Compile with /std:c++17 or higher
452+
#include <filesystem>
453+
454+
int main()
455+
{
456+
std::filesystem::path p(R"(c:\t\temp.txt)");
457+
auto native = p.native(); // Windows: L"c:\\t\temp.txt"
458+
auto generic = p.generic_string(); // Windows: "c:/t/temp.txt"
459+
}
460+
```
461+
445462
## <a name="op_as"></a> `path::operator=`
446463

447464
Replaces the elements of the path with a copy of another path.

docs/standard-library/range-adaptors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
description: "Learn more about range adaptors, which create views on ranges."
33
title: "Range adaptors"
4-
ms.date: 11/2/2022
4+
ms.date: 11/3/2022
55
f1_keywords: ["ranges/std::all", "ranges/std::all_t", "ranges/std::common", "ranges/std::counted", "ranges/std::drop", "ranges/std::drop_while", "ranges/std::elements", "ranges/std::filter", "ranges/std::iota", "ranges/std::join", "ranges/std::keys", "ranges/std::lazy_split", "ranges/std::reverse", "ranges/std::split", "ranges/std::subrange", "ranges/std::take", "ranges/std::take_while", "ranges/std::transform"]
66
helpviewer_keywords: ["std::ranges [C++], all", "std::ranges [C++], all_t", "std::ranges [C++], common", "std::ranges [C++], counted", "std::ranges [C++], drop", "std::ranges [C++], drop_while", "std::ranges [C++], elements", "std::ranges [C++], filter", "std::ranges [C++], iota", "std::ranges [C++], join", "std::ranges [C++], keys", "std::ranges [C++], lazy_split", "std::ranges [C++], reverse", "std::ranges [C++], split", "std::ranges [C++], subrange", "std::ranges [C++], take", "std::ranges [C++], take_while", "std::ranges [C++], transform"]
77
---
8-
# `ranges` adaptors
8+
# Range adaptors
99

1010
Range adaptors create a *view* (one of the [View classes](view-classes.md) in the `std::views` namespace) from a range. We recommend that you use an adaptor in `std::ranges::views` instead of creating the view types directly. The adaptors are the intended way to access views. They're easier to use, and in some cases more efficient, than creating instances of the view types directly.
1111

docs/standard-library/range-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,5 +416,5 @@ Use `std::ranges::views::all()` to convert a range to a view.
416416
## See also
417417

418418
[`<ranges>`](ranges.md)\
419-
[`<ranges>` adaptors](range-adaptors.md)\
419+
[Range adaptors](range-adaptors.md)\
420420
[View classes](view-classes.md)

docs/standard-library/ranges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ The range concepts mirror the hierarchy of iterator categories. The following ta
134134
## See also
135135

136136
[`<ranges>` functions](range-functions.md)\
137-
[`<ranges>` adaptors](range-adaptors.md)\
138137
[`<ranges>` concepts](range-concepts.md)\
138+
[Range adaptors](range-adaptors.md)\
139139
[Header files reference](../standard-library/cpp-standard-library-header-files.md)

docs/standard-library/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,6 @@ items:
930930
href: range-concepts.md
931931
- name: <ranges> functions
932932
href: range-functions.md
933-
- name: <ranges> adaptors
934-
href: range-adaptors.md
935933
- name: <ranges> view classes
936934
href: view-classes.md
937935
expanded: false
@@ -980,6 +978,8 @@ items:
980978
href: values-view-class.md
981979
- name: view_interface
982980
href: view-interface.md
981+
- name: Range adaptors
982+
href: range-adaptors.md
983983
- name: <ratio>
984984
href: ratio.md
985985
- name: <regex>

0 commit comments

Comments
 (0)