Skip to content

Commit 0775893

Browse files
jensmaurerzygoloid
authored andcommitted
[macros,class] Define \defnadj and use it experimentally
1 parent 9459c13 commit 0775893

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

source/classes.tex

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@
127127
\end{note}
128128

129129
\pnum
130-
\indextext{trivially copyable class|see{class, trivially copyable}}%
131-
A \defnx{trivially copyable class}{class!trivially copyable} is a class:
130+
A \defnadj{trivially copyable}{class} is a class:
132131

133132
\begin{itemize}
134133
\item where each copy constructor, move constructor, copy assignment operator,
@@ -140,17 +139,15 @@
140139
\end{itemize}
141140

142141
\pnum
143-
\indextext{trivial class|see{class, trivial}}%
144-
A \defnx{trivial class}{class!trivial} is a class that is trivially copyable and
142+
A \defnadj{trivial}{class} is a class that is trivially copyable and
145143
has one or more default constructors\iref{class.ctor},
146144
all of which are either trivial or deleted and
147145
at least one of which is not deleted.
148146
\begin{note} In particular, a trivially copyable or trivial class does not have
149147
virtual functions or virtual base classes.\end{note}
150148

151149
\pnum
152-
\indextext{standard-layout|see{class, standard-layout}}%
153-
A class \tcode{S} is a \defnx{standard-layout class}{class!standard-layout} if it:
150+
A class \tcode{S} is a \defnadj{standard-layout}{class} if it:
154151
\begin{itemize}
155152
\item has no non-static data members of type non-standard-layout class
156153
(or array of such types) or reference,

source/macros.tex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@
181181

182182
% Code and definitions embedded in text.
183183
\newcommand{\tcode}[1]{\CodeStylex{#1}}
184-
\newcommand{\defnx}[2]{\indexdefn{#2}\textit{#1}}
185-
\newcommand{\defn}[1]{\defnx{#1}{#1}}
186184
\newcommand{\term}[1]{\textit{#1}}
187185
\newcommand{\gterm}[1]{\GrammarStylex{#1}}
188186
\newcommand{\fakegrammarterm}[1]{\gterm{#1}}
@@ -193,6 +191,14 @@
193191
\newcommand{\defnxname}[1]{\indextext{\idxxname{#1}}\xname{#1}}
194192
\newcommand{\defnlibxname}[1]{\indexlibrary{\idxxname{#1}}\xname{#1}}
195193

194+
% Non-compound defined term.
195+
\newcommand{\defn}[1]{\defnx{#1}{#1}}
196+
% Defined term with different index entry.
197+
\newcommand{\defnx}[2]{\indexdefn{#2}\textit{#1}}
198+
% Compound defined term with 'see' for primary term.
199+
% Usage: \defnadj{trivial}{class}
200+
\newcommand{\defnadj}[2]{\indextext{#1 #2|see{#2, #1}}\indexdefn{#2!#1}\textit{#1 #2}}
201+
196202
%%--------------------------------------------------
197203
%% allow line break if needed for justification
198204
\newcommand{\brk}{\discretionary{}{}{}}

0 commit comments

Comments
 (0)