#include "tmp.h"
#include <iostream>
using namespace std;
struct P1
{
P1() { cout << "p1" << endl; };
//error
//P1(int m) = default;
P1(int m) { cout << "p1:" << m << endl; };
};
struct P2
{
P2() { cout << "P2" << endl; };
//error
//P1(int m) = default;
P2(int m) { cout << "P2:" << m << endl; };
};
struct D:P1,P2
{
//error
using P1::P1;
using P2::P2;
//使用p1所有的构造函数
D(int m):P2(m),P1(m)
{}
};
int main2()
{
D d(23);
return 0;
}