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++/49450] New: not possible to call explicit destructor of std::string


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49450

           Summary: not possible to call explicit destructor of
                    std::string
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jwillemsen@remedy.nl


We want to use C++0x unions with a std::string as member (see for example
http://www2.research.att.com/~bs/C++0xFAQ.html#unions). At the moment we want
to call the ~string we get an error.

Reproducer:

#include <string>

int main ()
{
        std::string s;
        s.~string();
        return 0;
}

message

g++-4.6 -c t.cpp
t.cpp: In function âint main()â:
t.cpp:6:11: error: expected class-name before â(â token


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