C++ Logo

STD-DISCUSSION

Advanced search

Subject: Expression equivalence for template loading
From: Krystian Stasiowski (sdkrystian_at_[hidden])
Date: 2019-08-16 18:03:33


http://eel.is/c++draft/temp.over.link#5.sentence-1 states:

> Two expressions involving template parameters are considered equivalent
if two function definitions containing the expressions would satisfy the
one-definition rule, except that [...]

>From my reading, there are several things wrong with this sentence.
Firstly, it never specifies where in the function definition this
expression would go: the parameters? return type? in the body? Making a few
assumptions, its safe to say that the probable intended meaning is in the
body, but that brings up another issue: these two functions would never
satisfy the one definition rule, Perhaps the intended wording for this is:

> Two expressions involving template parameters are considered equivalent
if two inline function definitions in separate translation containing the
expressions in their function-body would satisfy the one definition rule

Which would make a lot more sense.



STD-DISCUSSION list run by herb.sutter at gmail.com

Older Archives on Google Groups