view gcc/testsuite/g++.dg/cpp0x/inh-ctor21.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/70972
// { dg-do run { target c++11 } }

struct abort_on_copy{
    abort_on_copy(abort_on_copy&&) = default;
    abort_on_copy(const abort_on_copy&) { __builtin_abort(); }
    abort_on_copy() = default;
};

struct A {
    A(abort_on_copy) {}
};
struct B : A {
    using A::A;
};

int main() {
    B b(abort_on_copy{});
}