10651
10651
10652
10652
\begin {ncbnf }
10653
10653
\nontermdef {pathname}\br
10654
- root-name root-directory\opt relative-path\opt\br
10655
- root-directory relative-path\opt\br
10656
- relative-path
10654
+ root-name\opt {} root-directory\opt {} relative-path
10657
10655
\end {ncbnf }
10658
10656
10659
10657
\begin {ncbnf }
10670
10668
\begin {ncbnf }
10671
10669
\nontermdef {relative-path}\br
10672
10670
filename\br
10673
- relative-path directory-separator\br
10674
- relative-path directory-separator filename\br
10671
+ filename directory-separator relative-path\br
10675
10672
\textnormal {an empty path}
10676
10673
\end {ncbnf }
10677
10674
@@ -10682,20 +10679,18 @@
10682
10679
10683
10680
\begin {ncbnf }
10684
10681
\nontermdef {directory-separator}\br
10685
- slash\br
10686
- slash directory-separator\br
10687
- preferred-separator\br
10688
- preferred-separator directory-separator
10682
+ preferred-separator directory-separator\opt\br
10683
+ fallback-separator directory-separator\opt
10689
10684
\end {ncbnf }
10690
10685
10691
10686
\begin {ncbnf }
10692
10687
\nontermdef {preferred-separator}\br
10693
- \textnormal {operating system dependent directory separator character\footnote {May be a synonym for \grammarterm {slash}.} }
10688
+ \textnormal {operating system dependent directory separator character}
10694
10689
\end {ncbnf }
10695
10690
10696
10691
\begin {ncbnf }
10697
- \nontermdef {slash }\br
10698
- \tcode {/}
10692
+ \nontermdef {fallback-separator }\br
10693
+ \textnormal { \ tcode {/}, if \grammarterm {preferred-separator} is not \tcode {/} }
10699
10694
\end {ncbnf }
10700
10695
10701
10696
\pnum
11281
11276
p.make_preferred();
11282
11277
std::cout << p << '\n' ;
11283
11278
\end {codeblock }
11284
- On an operating system where \grammarterm {preferred-separator} is the same as
11285
- \grammarterm {directory-separator}, the output is:
11279
+ On an operating system where \grammarterm {preferred-separator} is a slash,
11280
+ the output is:
11286
11281
\begin {codeblock }
11287
11282
"foo/bar"
11288
11283
"foo/bar"
11470
11465
\pnum
11471
11466
Generic format observer functions return strings formatted according to the
11472
11467
generic pathname format (\ref {fs.path.generic }).
11473
- The forward slash (\tcode {'/'}) character is used as
11474
- the \grammarterm {directory-separator} character .
11468
+ A single slash (\tcode {'/'}) character is used as
11469
+ the \grammarterm {directory-separator}.
11475
11470
11476
11471
\pnum
11477
11472
\begin {example } On an operating system that uses backslash as
11908
11903
\end {codeblock }
11909
11904
The above assertions will succeed.
11910
11905
On Windows, the returned path's \grammarterm {directory-separator} characters
11911
- will be backslashes rather than forward slashes,
11906
+ will be backslashes rather than slashes,
11912
11907
but that does not affect \tcode {path} equality.
11913
11908
\end {example }
11914
11909
11976
11971
The generic format is required to ensure lexicographical
11977
11972
comparison works correctly. \end {note }
11978
11973
\item Each successive \grammarterm {filename} element, if present.
11979
- \item An empty element, if one or more trailing non-root \grammarterm {slash }
11980
- characters are present.
11974
+ \item An empty element, if a trailing non-root \grammarterm {directory-separator }
11975
+ is present.
11981
11976
\end {itemize }
11982
11977
11983
11978
\pnum
0 commit comments