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: [email protected]
ReportedBy: [email protected]
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);
}