From 807fbbd647bff191246ac78c6a15cde6381d9011 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 | 2 ++ source/ranges.tex | 26 +++++++++++++------------- source/strings.tex | 4 ++-- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index c8abbf38f6..25195a33ec 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -11043,9 +11043,9 @@ class span; template - inline constexpr bool ranges::enable_view> = true; + inline constexpr bool ranges::@\deflibspec{enable_view}{<}{span}@> = true; template - inline constexpr bool ranges::enable_borrowed_range> = true; + inline constexpr bool ranges::@\deflibspec{enable_borrowed_range}{<}{span}@> = true; // \ref{span.objectrep}, views of object representation template diff --git a/source/iostreams.tex b/source/iostreams.tex index 3554d361ca..d847b5cad4 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -12670,14 +12670,14 @@ namespace std::ranges { template<> - inline constexpr bool enable_borrowed_range = true; + inline constexpr bool @\deflibspec{enable_borrowed_range}{ = true; template<> - inline constexpr bool enable_borrowed_range = true; + inline constexpr bool @\deflibspec{enable_borrowed_range}{ = true; template<> - inline constexpr bool enable_view = true; + inline constexpr bool @\deflibspec{enable_view}{ = true; template<> - inline constexpr bool enable_view = true; + inline constexpr bool @\deflibspec{enable_view}{ = true; } \end{codeblock} diff --git a/source/iterators.tex b/source/iterators.tex index ce9786e65a..f96635bcb1 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -316,7 +316,7 @@ template requires (!@\libconcept{sized_sentinel_for}@) - inline constexpr bool disable_sized_sentinel_for, + inline constexpr bool @\deflibspec{disable_sized_sentinel_for}{<}{reverse_iterator}@, reverse_iterator> = true; // \ref{insert.iterators}, insert iterators diff --git a/source/macros.tex b/source/macros.tex index 46011ec26a..6c2d6ac4b8 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -192,6 +192,8 @@ \newcommand{\indexlibraryglobal}[1]{\indexlibrary{\idxcode{#1}}} \newcommand{\indexlibraryctor}[1]{\indexlibrarymisc{#1}{constructor}} \newcommand{\indexlibrarydtor}[1]{\indexlibrarymisc{#1}{destructor}} +\newcommand{\indexlibraryspec}[2]{\indexlibrarymisc{#1}{\idxcode{#2}}} +\newcommand{\deflibspec}[3]{\tcode{#1#2#3}\indexlibraryspec{#1}{#3}} % class member library index \newcommand{\indexlibrarymemberx}[2]{\indexlibrarymisc{#1}{\idxcode{#2}}} diff --git a/source/ranges.tex b/source/ranges.tex index 7616368c5f..05a6ff2eaf 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -128,7 +128,7 @@ class subrange; template - inline constexpr bool enable_borrowed_range> = true; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{subrange}@> = true; // \ref{range.dangling}, dangling iterator handling struct dangling; @@ -145,7 +145,7 @@ class empty_view; template - inline constexpr bool enable_borrowed_range> = true; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{empty_view}@> = true; namespace views { template @@ -168,7 +168,7 @@ class iota_view; template - inline constexpr bool enable_borrowed_range> = true; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{iota_view}@> = true; namespace views { inline constexpr @\unspec@ iota = @\unspec@; } @@ -196,7 +196,7 @@ class ref_view; template - inline constexpr bool enable_borrowed_range> = true; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{ref_view}@> = true; // \ref{range.owning.view}, owning view template @@ -204,7 +204,7 @@ class owning_view; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{owning_view}@> = enable_borrowed_range; // \ref{range.filter}, filter view template<@\libconcept{input_range}@ V, @\libconcept{indirect_unary_predicate}@> Pred> @@ -226,7 +226,7 @@ template<@\libconcept{view}@> class take_view; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{take_view}@> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ take = @\unspec@; } @@ -243,7 +243,7 @@ class drop_view; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{drop_view}@> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ drop = @\unspec@; } @@ -254,7 +254,7 @@ class drop_while_view; template - inline constexpr bool enable_borrowed_range> = + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{drop_while_view}@> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ drop_while = @\unspec@; } @@ -296,7 +296,7 @@ class common_view; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{common_view}@> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ common = @\unspec@; } @@ -306,7 +306,7 @@ class reverse_view; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{reverse_view}@> = enable_borrowed_range; namespace views { inline constexpr @\unspec@ reverse = @\unspec@; } @@ -316,7 +316,7 @@ class elements_view; template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range; + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{elements_view}@> = enable_borrowed_range; template using @\libglobal{keys_view}@ = elements_view; @@ -336,7 +336,7 @@ class zip_view; template - inline constexpr bool enable_borrowed_range> = + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{zip_view}@> = (enable_borrowed_range && ...); namespace views { inline constexpr @\unspec@ zip = @\unspec@; } @@ -356,7 +356,7 @@ class adjacent_view; template - inline constexpr bool enable_borrowed_range> = + inline constexpr bool @\deflibspec{enable_borrowed_range}{<}{adjacent_view}@> = enable_borrowed_range; namespace views { diff --git a/source/strings.tex b/source/strings.tex index ee30bed8c1..a7b38452d4 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -4057,9 +4057,9 @@ class basic_string_view; template - inline constexpr bool ranges::enable_view> = true; + inline constexpr bool ranges::@\deflibspec{enable_view}{<}{basic_string_view}@> = true; template - inline constexpr bool ranges::enable_borrowed_range> = true; + inline constexpr bool ranges::@\deflibspec{enable_borrowed_range}{<}{basic_string_view}@> = true; // \ref{string.view.comparison}, non-member comparison functions template