Skip to content
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

[support.srcloc] Canonicalize presentation. #3268

Merged
merged 1 commit into from
Oct 6, 2019
Merged
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
2 changes: 1 addition & 1 deletion source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@
\libheaderref{numbers},
\libheaderref{ranges},
\libheaderref{semaphore},
\libheaderref{source_location},
\libheaderrefx{source_location}{source.location.syn},
\libheaderref{span},
\libheaderrefx{stop_token}{thread.stoptoken.syn},
\libheaderref{syncstream}, and
Expand Down
16 changes: 12 additions & 4 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3218,13 +3218,21 @@
An \impldef{return value of \tcode{bad_typeid::what}} \ntbs{}.
\end{itemdescr}

\rSec1[support.srcloc]{Class \tcode{source_location}}
\rSec1[support.srcloc]{Source location}

\rSec2[source.location.syn]{Header \tcode{<source_location>} synopsis}

The header \libheaderdef{source_location} defines
the class \tcode{source_location}
that provides a means to obtain source location information.

\rSec2[source_location.syn]{Header \tcode{<source_location>} synopsis}
\begin{codeblock}
namespace std {
struct source_location;
}
\end{codeblock}

\rSec2[support.srcloc.class]{Class \tcode{source_location}}

\indexlibraryglobal{source_location}%
\begin{codeblock}
Expand Down Expand Up @@ -3288,7 +3296,7 @@
\item \tcode{lhs.column() == rhs_p.column()}
\end{itemize}

\rSec2[support.srcloc.cons]{Creation}
\rSec3[support.srcloc.cons]{Creation}

\begin{itemdecl}
static consteval source_location current() noexcept;
Expand Down Expand Up @@ -3390,7 +3398,7 @@
The data members are initialized with valid but unspecified values.
\end{itemdescr}

\rSec2[support.srcloc.access]{Field access}
\rSec3[support.srcloc.obs]{Observers}

\begin{itemdecl}
constexpr uint_least32_t line() const noexcept;
Expand Down
7 changes: 5 additions & 2 deletions tools/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Ignore files where rules may be violated within macro definitions.
texfiles=$(ls *.tex | grep -v macros.tex | grep -v layout.tex | grep -v tables.tex)
texlib="lib-intro.tex support.tex concepts.tex diagnostics.tex utilities.tex iterators.tex ranges.tex algorithms.tex numerics.tex time.tex locales.tex iostreams.tex regex.tex atomics.tex threads.tex"
texlib="lib-intro.tex support.tex concepts.tex diagnostics.tex utilities.tex strings.tex containers.tex iterators.tex ranges.tex algorithms.tex numerics.tex time.tex locales.tex iostreams.tex regex.tex atomics.tex threads.tex"

grep -Fe "Overfull \\hbox" std.log && exit 1
grep "LaTeX Warning..There were undefined references" std.log && exit 1
Expand Down Expand Up @@ -32,7 +32,7 @@ grep -Hne '^\\\(change\|rationale\|effect\|difficulty\|howwide\)\s.\+$' compatib
# Fixup: sed 's/^\\\(change\|rationale\|effect\|difficulty\|howwide\)\s\(.\)/\\\1\n\2/'

# "template <class" (with space) in library clause.
grep -ne 'template\s<class' $texlib && exit 1
grep -ne 'template\s<class' $texlib | sed 's/$/ <--- space between "template" and "<class"/' | grep . && exit 1

# \begin{example/note} with non-whitespace in front on the same line.
grep -ne '^.*[^ ]\s*\\\(begin\|end\){\(example\|note\)}' $texfiles && exit 1
Expand All @@ -54,6 +54,9 @@ done | grep . && exit 1
grep -n "&[ 0-9a-z_]\+) = delete" $texfiles && exit 1
# to fix: sed '/= delete/s/&[ 0-9a-z_]\+)/\&)/'

# Bad characters in label. "-" is allowed due to a single remaining offender.
grep -n '^\\rSec.\[[^]]*[^-a-z.0-9][^]]*\]{' $texfiles | sed 's/$/ <--- bad character in label/' | grep . && exit 1

# \placeholder before (
#egrep 'placeholder{[-A-Za-z]*}@?\(' *.tex
# to fix: sed -i 's/placeholder\({[-A-Za-z]*}@\?(\)/placeholdernc\1/g' *.tex
Expand Down