From da20ac9903d1ebba83d32750e9819e8b4638c5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Fri, 19 Nov 2021 12:41:49 -0400 Subject: [PATCH] [std] Index specializations of range variable templates --- source/containers.tex | 4 ++-- source/iostreams.tex | 8 ++++---- source/iterators.tex | 2 +- source/macros.tex | 1 + source/ranges.tex | 30 +++++++++++++++--------------- source/strings.tex | 4 ++-- 6 files changed, 25 insertions(+), 24 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 258a4e7ffb..a361e4493b 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -14311,9 +14311,9 @@ template class span; - template + template @\indexlibraryspec{enable_view}{span}@ inline constexpr bool ranges::enable_view> = true; - template + template @\indexlibraryspec{enable_borrowed_range}{span}@ inline constexpr bool ranges::enable_borrowed_range> = true; // \ref{span.objectrep}, views of object representation diff --git a/source/iostreams.tex b/source/iostreams.tex index 9ba1433df9..e51f4d967b 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -12671,14 +12671,14 @@ } namespace std::ranges { - template<> + template<> @\indexlibraryspec{enable_borrowed_range}{directory_iterator}@ inline constexpr bool enable_borrowed_range = true; - template<> + template<> @\indexlibraryspec{enable_borrowed_range}{recursive_directory_iterator}@ inline constexpr bool enable_borrowed_range = true; - template<> + template<> @\indexlibraryspec{enable_view}{directory_iterator}@ inline constexpr bool enable_view = true; - template<> + template<> @\indexlibraryspec{enable_view}{recursive_directory_iterator}@ inline constexpr bool enable_view = true; } \end{codeblock} diff --git a/source/iterators.tex b/source/iterators.tex index 14e44f0150..185a5b453a 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -314,7 +314,7 @@ template constexpr reverse_iterator make_reverse_iterator(Iterator i); - template + template @\indexlibraryspec{disable_sized_sentinel_for}{reverse_iterator}@ requires (!@\libconcept{sized_sentinel_for}@) inline constexpr bool disable_sized_sentinel_for, reverse_iterator> = true; diff --git a/source/macros.tex b/source/macros.tex index 84f6ecbf71..585017f6b1 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -192,6 +192,7 @@ \newcommand{\indexlibraryglobal}[1]{\indexlibrary{\idxcode{#1}}} \newcommand{\indexlibraryctor}[1]{\indexlibrarymisc{#1}{constructor}} \newcommand{\indexlibrarydtor}[1]{\indexlibrarymisc{#1}{destructor}} +\newcommand{\indexlibraryspec}[2]{\indexlibrary{\idxcode{#1}!\idxcode{#2}}} % class member library index \newcommand{\indexlibrarymemberx}[2]{\indexlibrarymisc{#1}{\idxcode{#2}}} diff --git a/source/ranges.tex b/source/ranges.tex index 8d7da0435e..25cfddd6cf 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -127,7 +127,7 @@ requires (K == subrange_kind::sized || !@\libconcept{sized_sentinel_for}@) class subrange; - template + template @\indexlibraryspec{enable_borrowed_range}{subrange}@ inline constexpr bool enable_borrowed_range> = true; // \ref{range.dangling}, dangling iterator handling @@ -154,7 +154,7 @@ requires is_object_v class empty_view; - template + template @\indexlibraryspec{enable_borrowed_range}{empty_view}@ inline constexpr bool enable_borrowed_range> = true; namespace views { @@ -177,7 +177,7 @@ requires @\exposconcept{weakly-equality-comparable-with}@ && @\libconcept{copyable}@ class iota_view; - template + template @\indexlibraryspec{enable_borrowed_range}{iota_view}@ inline constexpr bool enable_borrowed_range> = true; namespace views { inline constexpr @\unspec@ iota = @\unspec@; } @@ -210,7 +210,7 @@ requires is_object_v class ref_view; - template + template @\indexlibraryspec{enable_borrowed_range}{ref_view}@ inline constexpr bool enable_borrowed_range> = true; // \ref{range.owning.view}, owning view @@ -218,7 +218,7 @@ requires @\seebelow@ class owning_view; - template + template @\indexlibraryspec{enable_borrowed_range}{owning_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; // \ref{range.filter}, filter view @@ -240,7 +240,7 @@ // \ref{range.take}, take view template<@\libconcept{view}@> class take_view; - template + template @\indexlibraryspec{enable_borrowed_range}{take_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ take = @\unspec@; } @@ -257,7 +257,7 @@ template<@\libconcept{view}@ V> class drop_view; - template + template @\indexlibraryspec{enable_borrowed_range}{drop_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ drop = @\unspec@; } @@ -268,7 +268,7 @@ @\libconcept{indirect_unary_predicate}@> class drop_while_view; - template + template @\indexlibraryspec{enable_borrowed_range}{drop_while_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; @@ -322,7 +322,7 @@ requires (!@\libconcept{common_range}@ && @\libconcept{copyable}@>) class common_view; - template + template @\indexlibraryspec{enable_borrowed_range}{common_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ common = @\unspec@; } @@ -332,7 +332,7 @@ requires @\libconcept{bidirectional_range}@ class reverse_view; - template + template @\indexlibraryspec{enable_borrowed_range}{reverse_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ reverse = @\unspec@; } @@ -342,7 +342,7 @@ requires @\seebelow@ class elements_view; - template + template @\indexlibraryspec{enable_borrowed_range}{elements_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; template @@ -362,7 +362,7 @@ requires (@\libconcept{view}@ && ...) && (sizeof...(Views) > 0) class zip_view; - template + template @\indexlibraryspec{enable_borrowed_range}{zip_view}@ inline constexpr bool enable_borrowed_range> = (enable_borrowed_range && ...); @@ -382,7 +382,7 @@ requires @\libconcept{view}@ && (N > 0) class adjacent_view; - template + template @\indexlibraryspec{enable_borrowed_range}{adjacent_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; @@ -412,7 +412,7 @@ requires @\libconcept{forward_range}@ class chunk_view; - template + template @\indexlibraryspec{enable_borrowed_range}{chunk_view}@ inline constexpr bool enable_borrowed_range> = @\libconcept{forward_range}@ && enable_borrowed_range; @@ -423,7 +423,7 @@ requires @\libconcept{forward_range}@ class slide_view; - template + template @\indexlibraryspec{enable_borrowed_range}{slide_view}@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; diff --git a/source/strings.tex b/source/strings.tex index d163c25419..87224c52f7 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -540,9 +540,9 @@ template> class basic_string_view; - template + template @\indexlibraryspec{enable_view}{basic_string_view}@ inline constexpr bool ranges::enable_view> = true; - template + template @\indexlibraryspec{enable_borrowed_range}{basic_string_view}@ inline constexpr bool ranges::enable_borrowed_range> = true; // \ref{string.view.comparison}, non-member comparison functions