Skip to content

Commit 04fa34f

Browse files
committed
Moved rule of five and rule of zero to glossary
1 parent f36c913 commit 04fa34f

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

latex/glossary.tex

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,26 @@
445445
)}
446446
}
447447

448+
\newglossaryentry{rule-of-five}
449+
{
450+
name={rule of five},
451+
description={For a given class, if at least one of the
452+
copy constructor, move constructor, copy assignment operator, move assignment operator or destructor
453+
is explicitly declared,
454+
all of them should be explicity declared.
455+
}
456+
}
457+
458+
\newglossaryentry{rule-of-zero}
459+
{
460+
name={rule of zero},
461+
description={For a given class, if the
462+
copy constructor, move constructor, copy assignment operator, move assignment operator and destructor
463+
would all be inlined, public and defaulted,
464+
none of them should be explicity declared.
465+
}
466+
}
467+
448468
\newglossaryentry{smcp}
449469
{
450470
name={SMCP},

latex/programming_interface.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ \subsection{Common by-value semantics}
187187

188188
Some \gls{sycl-runtime} classes will have additional behavior associated with copy, movement, assignment or destruction semantics. If these are specified they are in addition to those specified above unless stated otherwise.
189189

190-
Each of the runtime classes mentioned above must provide a common interface of special member functions and member functions in order to fulfil the copy, move, destruction and equality requirements. If all of the special member functions are inlined, public and defaulted, none of them should be explicitly declared (Rule of Zero); otherwise, all of them should be explicitly declared (Rule of Five).
190+
Each of the runtime classes mentioned above must provide a common interface of special member functions and member functions in order to fulfil the copy, move, destruction and equality requirements, following the \gls{rule-of-five} and \gls{rule-of-zero}.
191191

192192
These common special member functions and hidden friend functions are described in Tables~\ref{table.specialmembers.common.byval} and \ref{table.hiddenfriends.common.byval} respectively.
193193

0 commit comments

Comments
 (0)