This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50855] New: Name mangling for late return types invoking constructors not implemented
- From: "public at alisdairm dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Oct 2011 13:59:33 +0000
- Subject: [Bug c++/50855] New: Name mangling for late return types invoking constructors not implemented
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50855
Bug #: 50855
Summary: Name mangling for late return types invoking
constructors not implemented
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: public@alisdairm.net
Jason suggested I file the issue, even though the error message indicates a
known limitation.
The following code yields the error:
main.cpp: In instantiation of 'decltype ({256}) test(const T&) [with T = char,
decltype ({256}) = char]':
main.cpp:8:14: instantiated from here
main.cpp:2:6: sorry, unimplemented: mangling constructor
template<typename T>
auto test(T const &) -> decltype(T{256}) {
return T{};
}
int main() {
char c = 42;
c = test(c);
}