Is this compile error typedef int (*j)() throw(A)?

c++, typedef, visual-studio-2012

Solution

I know this is not an answer to this question -

MSVC 2010(that I have) throws no error, compiles fine and works without a hiccup

G++(GNU) says `error: 'j' declared with an exception specification`

Clang says `error: exception specifications are not allowed in typedefs`

Bottomline: Compiler bug in MSVC.

Problem

``` #include <iostream> class A {}; typedef int (*j)() throw(A); int f() { std::cout << "function f" << std::endl; return 0; } int main() { j y = f; y(); } ``` In all sites and Stroustrup too says that there will be compile error, but it compiles. Are there any changes in standard?

Original source