|
811 | 811 | is non-amortized, unlike the case for the complexity of the evaluations of
|
812 | 812 | \tcode{ranges::begin} and \tcode{ranges::end} in the \tcode{Range} concept.
|
813 | 813 | \end{note}
|
| 814 | +\end{itemdescr} |
| 815 | + |
| 816 | +\indexlibrary{\idxcode{disable_sized_range}}% |
| 817 | +\begin{itemdecl} |
| 818 | +template<class> |
| 819 | + inline constexpr bool disable_sized_range = false; |
| 820 | +\end{itemdecl} |
814 | 821 |
|
| 822 | +\begin{itemdescr} |
815 | 823 | \pnum
|
| 824 | +\remarks |
816 | 825 | Pursuant to \ref{namespace.std},
|
817 | 826 | users may specialize \tcode{disable_sized_range}
|
818 | 827 | for cv-unqualified non-array object types.
|
|
829 | 838 |
|
830 | 839 | \rSec2[range.view]{Views}
|
831 | 840 |
|
| 841 | +\indexlibrary{\idxcode{View}}% |
| 842 | +\begin{itemdecl} |
| 843 | +template<class T> |
| 844 | + concept View = |
| 845 | + Range<T> && Semiregular<T> && enable_view<T>; |
| 846 | +\end{itemdecl} |
| 847 | + |
| 848 | +\begin{itemdescr} |
| 849 | +% FIXME: This should explicitly say when View is modeled. |
832 | 850 | \pnum
|
833 | 851 | The \tcode{View} concept specifies the requirements of a \libconcept{Range} type
|
834 | 852 | that has constant time copy, move, and assignment operators; that is, the cost of
|
|
852 | 870 | copying the container copies the elements,
|
853 | 871 | which cannot be done in constant time.
|
854 | 872 | \end{example}
|
| 873 | +\end{itemdescr} |
| 874 | + |
| 875 | +\pnum |
| 876 | +Since the difference between \libconcept{Range} and \libconcept{View} is largely |
| 877 | +semantic, the two are differentiated with the help of \tcode{enable_view}. |
855 | 878 |
|
856 | 879 | \indexlibrary{\idxcode{enable_view}}%
|
857 |
| -\indexlibrary{\idxcode{View}}% |
858 | 880 | \begin{itemdecl}
|
859 | 881 | template<class T>
|
860 | 882 | inline constexpr bool enable_view = @\seebelow@;
|
861 |
| - |
862 |
| -template<class T> |
863 |
| - concept View = |
864 |
| - Range<T> && Semiregular<T> && enable_view<T>; |
865 | 883 | \end{itemdecl}
|
866 | 884 |
|
867 | 885 | \begin{itemdescr}
|
868 | 886 | \pnum
|
869 |
| -Since the difference between \libconcept{Range} and \libconcept{View} is largely |
870 |
| -semantic, the two are differentiated with the help of \tcode{enable_view}. |
871 |
| - |
872 |
| -\pnum |
| 887 | +\remarks |
873 | 888 | For a type \tcode{T}, the default value of \tcode{enable_view<T>} is:
|
874 | 889 | \begin{itemize}
|
875 | 890 |
|
|
0 commit comments