This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33045] New: [c++0x] Incorrect decltype result for function calls.
- From: "gcc-bugzilla at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2007 22:21:37 -0000
- Subject: [Bug c++/33045] New: [c++0x] Incorrect decltype result for function calls.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Given:
int && f ();
template <typename> struct incomplete;
incomplete<decltype(f())> i;
GCC says (when invoked with -std=c++0x): "'incomplete<int> i' has incomplete
type"
However, the latest standard draft (n2369) states in section 7.1.6.2 paragraph
4: "if e is a function call [...], decltype(e) is the return type of that
function". So the error should've been: 'incomplete<int &&> i' has incomplete
type.
--
Summary: [c++0x] Incorrect decltype result for function calls.
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at contacts dot eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33045