This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50855] New: Name mangling for late return types invoking constructors not implemented


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);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]