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++/81527] Missing inherited constructor by "using-declarations"


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81527

--- Comment #1 from Wei-Wei Tu <tuwwcn at gmail dot com> ---
Some additional information:

The above code is REJECTED by GCC 6.2.0 too.

But the below code is PASSED by GCC 6.1.0, 6.3.0, 6.4.0, 7.1.0. The only
difference is explicitly casting p's type to its own type.

/////////////////////////////////////////////
#include <utility>

struct A : public std::pair< int, int> {
    using std::pair<int, int>::pair;
};

int main() {
    std::pair<int, int> p{1, 2}; 
    A a(std::pair<int, int>(p));
}
///////////////////////////////////////////

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