|
5 | 5 |
|
6 | 6 | \pnum
|
7 | 7 | This Clause describes the contents of the
|
8 |
| -\term{\Cpp{} standard library}, |
9 |
| -\indextext{library!C++ standard}% |
| 8 | +\defnx{\Cpp{} standard library}{library!C++ standard}, |
10 | 9 | how a well-formed \Cpp{} program makes use of the library, and
|
11 | 10 | how a conforming implementation may provide the entities in the library.
|
12 | 11 |
|
|
207 | 206 | \indexdefn{behavior!default}%
|
208 | 207 | \defncontext{implementation}
|
209 | 208 | specific behavior provided by the implementation,
|
210 |
| -within the scope of the |
211 |
| -\term{required behavior} |
| 209 | +within the scope of the required behavior |
212 | 210 |
|
213 | 211 | \definition{default behavior}{defns.default.behavior.func}
|
214 | 212 | \indexdefn{behavior!default}%
|
215 | 213 | \defncontext{specification}
|
216 |
| -description of |
217 |
| -\term{replacement function} |
218 |
| -and |
219 |
| -\term{handler function} |
| 214 | +description of replacement function and handler function |
220 | 215 | semantics
|
221 | 216 |
|
222 | 217 | \definition{direct-non-list-initialization}{defns.direct-non-list-init}
|
|
226 | 221 |
|
227 | 222 | \definition{handler function}{defns.handler}
|
228 | 223 | \indexdefn{function!handler}%
|
229 |
| -\term{non-reserved function} |
230 |
| -whose definition may be provided by a \Cpp{} program |
| 224 | +non-reserved function whose definition may be provided by a \Cpp{} program |
231 | 225 |
|
232 | 226 | \begin{defnote}
|
233 | 227 | A \Cpp{} program may designate a handler function at various points in its execution by
|
|
318 | 312 |
|
319 | 313 | \definition{required behavior}{defns.required.behavior}
|
320 | 314 | \indexdefn{behavior!required}%
|
321 |
| -description of |
322 |
| -\term{replacement function} |
323 |
| -and |
324 |
| -\term{handler function} |
325 |
| -semantics |
| 315 | +description of replacement function and handler function semantics |
326 | 316 | applicable to both the behavior provided by the implementation and
|
327 | 317 | the behavior of any such function definition in the program
|
328 | 318 |
|
|
628 | 618 | \pnum
|
629 | 619 | Here, the names $\tcode{\placeholder{C}}_0$,
|
630 | 620 | $\tcode{\placeholder{C}}_1$, etc.\ represent
|
631 |
| -\term{enumerated elements} |
| 621 | +\defnx{enumerated elements}{enumerated element} |
632 | 622 | for this particular enumerated type.
|
633 | 623 | \indextext{type!enumerated}%
|
634 | 624 | All such elements have distinct values.
|
|
646 | 636 | \indextext{type!enumerated}%
|
647 | 637 |
|
648 | 638 | \pnum
|
649 |
| -The bitmask type \term{bitmask} can be written: |
| 639 | +The bitmask type \tcode{\placeholder{bitmask}} can be written: |
650 | 640 |
|
651 | 641 | \begin{codeblock}
|
652 | 642 | // For exposition only.
|
|
661 | 651 | inline constexpr @$\tcode{\placeholder{bitmask C}}_{3}$@(@$\tcode{\placeholder{V}}_{3}{}$@);
|
662 | 652 | .....
|
663 | 653 |
|
664 |
| -constexpr @\term{bitmask}{}@ operator&(@\term{bitmask}{}@ X, @\term{bitmask}{}@ Y) { |
665 |
| - return static_cast<@\term{bitmask}{}@>( |
| 654 | +constexpr @\placeholder{bitmask}{}@ operator&(@\placeholder{bitmask}{}@ X, @\placeholder{bitmask}{}@ Y) { |
| 655 | + return static_cast<@\placeholder{bitmask}{}@>( |
666 | 656 | static_cast<int_type>(X) & static_cast<int_type>(Y));
|
667 | 657 | }
|
668 |
| -constexpr @\term{bitmask}{}@ operator|(@\term{bitmask}{}@ X, @\term{bitmask}{}@ Y) { |
669 |
| - return static_cast<@\term{bitmask}{}@>( |
| 658 | +constexpr @\placeholder{bitmask}{}@ operator|(@\placeholder{bitmask}{}@ X, @\placeholder{bitmask}{}@ Y) { |
| 659 | + return static_cast<@\placeholder{bitmask}{}@>( |
670 | 660 | static_cast<int_type>(X) | static_cast<int_type>(Y));
|
671 | 661 | }
|
672 |
| -constexpr @\term{bitmask}{}@ operator^(@\term{bitmask}{}@ X, @\term{bitmask}{}@ Y){ |
673 |
| - return static_cast<@\term{bitmask}{}@>( |
| 662 | +constexpr @\placeholder{bitmask}{}@ operator^(@\placeholder{bitmask}{}@ X, @\placeholder{bitmask}{}@ Y){ |
| 663 | + return static_cast<@\placeholder{bitmask}{}@>( |
674 | 664 | static_cast<int_type>(X) ^ static_cast<int_type>(Y));
|
675 | 665 | }
|
676 |
| -constexpr @\term{bitmask}{}@ operator~(@\term{bitmask}{}@ X){ |
677 |
| - return static_cast<@\term{bitmask}{}@>(~static_cast<int_type>(X)); |
| 666 | +constexpr @\placeholder{bitmask}{}@ operator~(@\placeholder{bitmask}{}@ X){ |
| 667 | + return static_cast<@\placeholder{bitmask}{}@>(~static_cast<int_type>(X)); |
678 | 668 | }
|
679 |
| -@\term{bitmask}{}@& operator&=(@\term{bitmask}{}@& X, @\term{bitmask}{}@ Y){ |
| 669 | +@\placeholder{bitmask}{}@& operator&=(@\placeholder{bitmask}{}@& X, @\placeholder{bitmask}{}@ Y){ |
680 | 670 | X = X & Y; return X;
|
681 | 671 | }
|
682 |
| -@\term{bitmask}{}@& operator|=(@\term{bitmask}{}@& X, @\term{bitmask}{}@ Y) { |
| 672 | +@\placeholder{bitmask}{}@& operator|=(@\placeholder{bitmask}{}@& X, @\placeholder{bitmask}{}@ Y) { |
683 | 673 | X = X | Y; return X;
|
684 | 674 | }
|
685 |
| -@\term{bitmask}{}@& operator^=(@\term{bitmask}{}@& X, @\term{bitmask}{}@ Y) { |
| 675 | +@\placeholder{bitmask}{}@& operator^=(@\placeholder{bitmask}{}@& X, @\placeholder{bitmask}{}@ Y) { |
686 | 676 | X = X ^ Y; return X;
|
687 | 677 | }
|
688 | 678 | \end{codeblock}
|
689 | 679 |
|
690 | 680 | \pnum
|
691 | 681 | Here, the names $\tcode{\placeholder{C}}_0$,
|
692 | 682 | $\tcode{\placeholder{C}}_1$, etc.\ represent
|
693 |
| -\term{bitmask elements} |
| 683 | +\defnx{bitmask elements}{bitmask!element} |
694 | 684 | for this particular bitmask type.
|
695 | 685 | \indextext{type!bitmask}%
|
696 | 686 | All such elements have distinct, nonzero values such that, for any pair $\tcode{\placeholder{C}}_i$
|
697 | 687 | and $\tcode{\placeholder{C}}_j$ where $i \neq j$, \tcode{$\placeholder{C}_i$ \& $\placeholder{C}_i$} is nonzero and
|
698 | 688 | \tcode{$\placeholder{C}_i$ \& $\placeholder{C}_j$} is zero.
|
699 |
| -\indextext{bitmask!empty}% |
700 |
| -Additionally, the value \tcode{0} is used to represent an \term{empty bitmask}, in which no |
| 689 | +Additionally, the value \tcode{0} is used to represent an \defnx{empty bitmask}{bitmask!empty}, in which no |
701 | 690 | bitmask elements are set.
|
702 | 691 |
|
703 | 692 | \pnum
|
704 | 693 | The following terms apply to objects and values of
|
705 | 694 | bitmask types:
|
706 | 695 | \begin{itemize}
|
707 | 696 | \item
|
708 |
| -To |
709 |
| -\term{set} |
| 697 | +To \defnx{set}{bitmask!value!set} |
710 | 698 | a value \textit{Y} in an object \textit{X}
|
711 | 699 | is to evaluate the expression \textit{X} \tcode{|=} \textit{Y}.
|
712 | 700 | \item
|
713 |
| -To |
714 |
| -\term{clear} |
| 701 | +To \defnx{clear}{bitmask!value!clear} |
715 | 702 | a value \textit{Y} in an object
|
716 | 703 | \textit{X} is to evaluate the expression \textit{X} \tcode{\&= \~}\textit{Y}.
|
717 | 704 | \item
|
718 |
| -The value \textit{Y} |
719 |
| -\term{is set} |
720 |
| -in the object |
| 705 | +The value \textit{Y} \defnx{is set}{bitmask!value!is set} in the object |
721 | 706 | \textit{X} if the expression \textit{X} \tcode{\&} \textit{Y} is nonzero.
|
722 | 707 | \end{itemize}
|
723 | 708 |
|
|
730 | 715 |
|
731 | 716 | \begin{itemize}
|
732 | 717 | \item
|
733 |
| -A |
734 |
| -\term{letter} |
735 |
| -is any of the 26 lowercase or 26 |
| 718 | +A \defn{letter} is any of the 26 lowercase or 26 |
736 | 719 | \indextext{lowercase}%
|
737 | 720 | \indextext{uppercase}%
|
738 | 721 | uppercase letters in the basic execution character set.
|
|
764 | 747 | object, as described in \ref{locales} and \ref{input.output}.
|
765 | 748 | \item
|
766 | 749 | A
|
767 |
| -\term{character sequence} |
| 750 | +\defn{character sequence} |
768 | 751 | is an array object\iref{dcl.array} \tcode{\placeholdernc{A}} that
|
769 | 752 | can be declared as
|
770 | 753 | \tcode{\placeholdernc{T\;A}[\placeholder{N}]},
|
|
785 | 768 |
|
786 | 769 | \rSec5[byte.strings]{Byte strings}
|
787 | 770 |
|
| 771 | +\indextext{string!null-terminated byte|see{\ntbs{}}}% |
788 | 772 | \pnum
|
789 |
| -A |
790 |
| -\indextext{NTBS}% |
791 |
| -\defnx{null-terminated byte string}{string!null-terminated byte}, |
| 773 | +A \defnx{null-terminated byte string}{NTBS@\ntbs{}}, |
792 | 774 | or \ntbs{},
|
793 | 775 | is a character sequence whose highest-addressed element
|
794 | 776 | with defined content has the value zero
|
795 |
| -(the |
796 |
| -\term{terminating null} |
797 |
| -character); no other element in the sequence has the value zero.% |
| 777 | +(the \defnx{terminating null character}{character!terminating null}); |
| 778 | +no other element in the sequence has the value zero.% |
798 | 779 | \indexhdr{cstring}%
|
799 |
| -\indextext{NTBS}\footnote{Many of the objects manipulated by |
| 780 | +\footnote{Many of the objects manipulated by |
800 | 781 | function signatures declared in
|
801 | 782 | \tcode{<cstring>}\iref{c.strings} are character sequences or \ntbs{}s.
|
802 | 783 | \indexhdr{cstring}%
|
803 | 784 | The size of some of these character sequences is limited by
|
804 | 785 | a length value, maintained separately from the character sequence.}
|
805 | 786 |
|
806 | 787 | \pnum
|
807 |
| -The |
808 |
| -\term{length} of an \ntbs{} |
| 788 | +The \defnx{length of an \ntbs{}}{NTBS@\ntbs{}!length} |
809 | 789 | is the number of elements that
|
810 | 790 | precede the terminating null character.
|
811 |
| -\indextext{NTBS}% |
812 |
| -An |
813 |
| -\term{empty} \ntbs{} |
| 791 | +An \defnx{empty \ntbs{}}{NTBS@\ntbs{}!empty} |
814 | 792 | has a length of zero.
|
815 | 793 |
|
816 | 794 | \pnum
|
817 |
| -The |
818 |
| -\term{value} of an \ntbs{} |
| 795 | +The \defnx{value of an \ntbs{}}{NTBS@\ntbs{}!value} |
819 | 796 | is the sequence of values of the
|
820 | 797 | elements up to and including the terminating null character.
|
821 |
| -\indextext{NTBS}% |
822 | 798 |
|
823 | 799 | \pnum
|
824 |
| -A |
825 |
| -\indextext{NTBS}% |
826 |
| -\defnx{static}{NTBS!static} \ntbs{} |
| 800 | +A \defnx{static \ntbs{}}{NTBS@\ntbs{}!static} |
827 | 801 | is an \ntbs{} with
|
828 | 802 | static storage duration.\footnote{A string literal, such as
|
829 | 803 | \tcode{"abc"},
|
830 | 804 | is a static \ntbs{}.}
|
831 | 805 |
|
832 | 806 | \rSec5[multibyte.strings]{Multibyte strings}
|
833 | 807 |
|
| 808 | +\indextext{string!null-terminated multibyte|see{\ntmbs{}}}% |
834 | 809 | \pnum
|
835 |
| -\indextext{NTBS}% |
836 |
| -\indextext{NTMBS}% |
837 |
| -A \defnx{null-terminated multibyte string}{string!null-terminated multibyte}, |
| 810 | +A \defnx{null-terminated multibyte string}{NTMBS@\ntmbs{}}, |
838 | 811 | or \ntmbs{},
|
839 | 812 | is an \ntbs{} that constitutes a
|
840 | 813 | sequence of valid multibyte characters, beginning and ending in the initial
|
|
844 | 817 | consists of a single byte.}
|
845 | 818 |
|
846 | 819 | \pnum
|
847 |
| -A |
848 |
| -\defnx{static}{NTMBS!static} \ntmbs{} |
| 820 | +A \defnx{static \ntmbs{}}{NTMBS@\ntmbs{}!static} |
849 | 821 | is an \ntmbs{} with static storage duration.
|
850 |
| -\indextext{NTMBS}% |
851 | 822 |
|
852 | 823 | \rSec3[functions.within.classes]{Functions within classes}
|
853 | 824 |
|
|
1029 | 1000 |
|
1030 | 1001 | \pnum
|
1031 | 1002 | Each element of the \Cpp{} standard library is declared or defined (as appropriate) in a
|
1032 |
| -\term{header}.\footnote{A header is not necessarily a source file, nor are the |
| 1003 | +\defn{header}.\footnote{A header is not necessarily a source file, nor are the |
1033 | 1004 | sequences delimited by \tcode{<} and \tcode{>} in header names necessarily valid source
|
1034 | 1005 | file names\iref{cpp.include}.}
|
1035 | 1006 |
|
|
1338 | 1309 | Two kinds of implementations are defined:
|
1339 | 1310 | \defnx{hosted}{implementation!hosted}
|
1340 | 1311 | and
|
1341 |
| -\term{freestanding}\iref{intro.compliance}. |
| 1312 | +\defnx{freestanding}{implementation!freestanding}\iref{intro.compliance}. |
1342 | 1313 | For a hosted implementation, this document
|
1343 | 1314 | describes the set of available headers.
|
1344 | 1315 |
|
|
2783 | 2754 | Unless otherwise specified,
|
2784 | 2755 | calls made by functions in the standard library to non-operator, non-member functions
|
2785 | 2756 | do not use functions from another namespace which are found through
|
2786 |
| -\term{argument-dependent name lookup}\iref{basic.lookup.argdep}. |
| 2757 | +argument-dependent name lookup\iref{basic.lookup.argdep}. |
2787 | 2758 | \begin{note}
|
2788 | 2759 | The phrase ``unless otherwise specified'' applies to cases such as
|
2789 | 2760 | the swappable with requirements\iref{swappable.requirements}.
|
|
2838 | 2809 | it means:
|
2839 | 2810 |
|
2840 | 2811 | \begin{itemize}
|
2841 |
| -\item For the \term{sort} algorithms the relative order of equivalent |
| 2812 | +\item For the sort algorithms the relative order of equivalent |
2842 | 2813 | elements is preserved.
|
2843 | 2814 |
|
2844 |
| -\item For the \term{remove} and \term{copy} algorithms the relative order of |
| 2815 | +\item For the remove and copy algorithms the relative order of |
2845 | 2816 | the elements that are not removed is preserved.
|
2846 | 2817 |
|
2847 |
| -\item For the \term{merge} algorithms, for equivalent elements in |
| 2818 | +\item For the merge algorithms, for equivalent elements in |
2848 | 2819 | the original two ranges, the elements from the first range (preserving their
|
2849 | 2820 | original order) precede the elements from the second range (preserving their
|
2850 | 2821 | original order).
|
|
0 commit comments