[Bug c++/52108] New: declval() with incomplete type
hidden_peak at mail dot ru
gcc-bugzilla@gcc.gnu.org
Fri Feb 3 13:52:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52108
Bug #: 52108
Summary: declval() with incomplete type
Classification: Unclassified
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hidden_peak@mail.ru
Created attachment 26563
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26563
bug illustration
Wrong report about 'incomplete type'. Situation has relation to type selection
technique.
Key string in the example is
template <class T>
static decltype( declval<typename T::pointer>(), declval<true_type>())
__test_p( int );
First declval (declval<typename T::pointer>) and comma operator required for
problem demonstration. Another condition is usage of x-pair<int,Incomplete>.
For testcase, see attached file. Compilation:
c++ -std=gnu++0x -c test.cc
More information about the Gcc-bugs
mailing list