次のスニペット コードを見ました。
class Foo
{
public:
void virtual func() throw (int, float) = 0;
};
class Bar : public Foo
{
public:
void virtual func() throw(short); // line 1: compile error "
// looser throw specifier"
void virtual func() throw(); // line 2: can compile
void virtual func() throw(float, int); // line 3: can compile
void virtual func() throw(float); // line 4: can compile
void virtual func() throw(int); // line 5: can compile
};
int main(void)
{
return 1;
}
Q1> とはどういう意味ですか?
void virtual func() throw (int, float) = 0;
Q2>なぜline1はコンパイラを通過できないのですか?
ありがとうございました