Similarly to (but not exactly the same as) the template ctor in bug 36871,
gcc 4.3.0 trips up on class with a throwing vararg ctor (regardless of the
number of arguments):

$ cat u.cpp && g++ u.cpp -std=c++0x && ./a.out 
#include <cassert>
#include <type_traits>

struct S {
    S (const S&) throw ();
    S (...) throw (int);
};


int main ()
{
    assert (std::has_nothrow_copy_constructor<S>::value);
    assert (__has_nothrow_copy (S));
}

a.out: u.cpp:12: int main(): Assertion
`std::has_nothrow_copy_constructor<S>::value' failed.
Aborted


-- 
           Summary: __has_nothrow_copy(T) false for T with a throwing vararg
                    ctor
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com


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

Reply via email to