[LLVMbugs] [Bug 12583] declval() with incomplete type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 17 23:09:31 PDT 2012


Petr Ovtchenkov <abominable-snowman at yandex.ru> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #4 from Petr Ovtchenkov <abominable-snowman at yandex.ru> 2012-04-18 01:09:31 CDT ---
> When two compilers tell you your code is broken, it probably is.

Just note: gcc's team treat it as a bug.

>From you explanation I can't understand: why you refer to "overloaded
'operator,'" or "friend comma operator". No overloaded comma operator here.

> Now, because the left-hand declval expression has type
'x_pair<int, Incomplete>*', 'x_pair<int, Incomplete>' is an associated class.
> Therefore we instantiate 'x_pair<int, Incomplete>' ...

Following this logic, when you see pointer to incomplete class, you try to
instantiate it. But this is not so.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list