Bug 43780 - [DR743] decltype cannot be used with the :: operator
Summary: [DR743] decltype cannot be used with the :: operator
Status: RESOLVED DUPLICATE of bug 6709
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-17 23:44 UTC by Faisal Vali
Modified: 2010-04-18 06:48 UTC (History)
8 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Faisal Vali 2010-04-17 23:44:31 UTC
gcc 4.5 in c++0x mode rejects the following valid code:

std::vector<int> vec;

decltype(vec)::value_type v = vec.first();

Per the DR above, decltype can be used with the :: operator.

This is similar to a bug report that someone posted for version 3.1, but my experience is with 4.5.
Comment 1 Andrew Pinski 2010-04-18 06:48:45 UTC
Yes your experience is with 4.5.0 but there is no reason to file a new bug about a known issue.  I don't know if the C++ defect report 743 have been voted on yet or not (if not then PR 6709 is suspended because we don't know the final decision of the standards committee).

*** This bug has been marked as a duplicate of 6709 ***