This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81527] Missing inherited constructor by "using-declarations"
- From: "tuwwcn at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Jul 2017 10:58:28 +0000
- Subject: [Bug c++/81527] Missing inherited constructor by "using-declarations"
- Auto-submitted: auto-generated
- References: <bug-81527-4@http.gcc.gnu.org/bugzilla/>
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));
}
///////////////////////////////////////////