New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[temp.res.general]/1 What does "is or is reachable" mean? #5189
Comments
@opensdh, any thoughts (or prayers)? |
It means "that is D or is reachable from D". |
@CaseyCarter @opensdh At the first glance of this sentence, it's hard to read. Fortunately, [temp.over.link.example] p3 has great help to understand the meaning. template <class T> decltype(g(T())) h();
int g(int);
template <class T> decltype(g(T())) h() // redeclaration of h() uses the earlier lookup…
{ return g(T()); } // … although the lookup here does find g(int)
int i = h<int>(); // template argument substitution fails; g(int)
// not considered at the first declaration of h() |
Would anyone object to changing this sentence to: A name that appears in a declaration $D$ of a template $T$ is looked up from where it appears in an unspecified
declaration of $T$ that is
+either $D$ itself
or is reachable from $D$ and from which no other declaration of $T$ that contains the usage
of the name is reachable. which I think preserves the intended meaning but would have been easier for me to decode? |
(Other than that, no.) |
What about women? |
The received wisdom addresses only the adult male case. I suspect women are also capable of eating and catching fish, but since I was stretching the saying already by applying it to reading, I didn't want to press my luck by assuming. |
The first sentence of the cited paragraph (which was merged verbatim from P1787R6 "Declarations and where to find them") is:
Is "A declaration of$T$ that is" an incredibly awkard way to say "any declaration of $T$ "? Or should "is or" be struck from this sentence?
The text was updated successfully, but these errors were encountered: