Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
cor3ntin committed Oct 27, 2023
1 parent 45cc7eb commit 18c2b14
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/D2841.tex
Original file line number Diff line number Diff line change
Expand Up @@ -532,26 +532,26 @@ \subsection{Deduction and partial ordering}

[\href{https://compiler-explorer.com/z/66dr6fnKj}{Run this example on Compiler Explorer}]

\subsection{Deduction of template argument fron the argument lust of a variable template argument}
\subsection{Deduction of template parameters from the argument list of a variable template argument}

This is not proposed.

Consider:

\begin{colorblock}
template<template <typename...> auto, auto>
inline constexpr bool is_specialization_of_v = false;
template<template <typename...> auto, auto>
inline constexpr bool is_specialization_of_v = false;

template<
template <typename...> auto v,
typename... Args
>
inline constexpr bool is_specialization_of_v<v, v<Args...>> = false; // #2
template<
template <typename...> auto v,
typename... Args
>
inline constexpr bool is_specialization_of_v<v, v<Args...>> = false; // #2

template <typename T>
constexpr int i = 42;
template <typename T>
constexpr int i = 42;

static_assert(is_specialization_of_v<i, i<int>>); // #3
static_assert(is_specialization_of_v<i, i<int>>); // #3
\end{colorblock}

\href{https://godbolt.org/z/sqTfEojh4}{[Compiler Explorer]}
Expand All @@ -572,7 +572,8 @@ \subsection{Deduction of template argument fron the argument lust of a variable
instead, we should make \#2 ill-formed, so that we have the opportunity to extend that at a later time if we find sufficient motivation for it.

There are existing cases where we make non-deductible partial specializations ill-formed (see \href{https://eel.is/c++draft/temp.spec.partial#match-3}{[temp.spec.partial.match])},
howevever in the general case we don't seem to (\href{https://gcc.godbolt.org/z/fv1e8nnsf}{for example here is an exampler with a non-deducible pack})
however in the general case we don't seem to (\href{https://gcc.godbolt.org/z/fv1e8nnsf}{for example here is an example with a non-deducible pack})




Expand Down

0 comments on commit 18c2b14

Please sign in to comment.