"Schwarzbauer Günter" <> wrote in message
news:...
> Hello,
>
> Does the C++ standard allow default parameters when defining a typedef for
a
> function type, e.g.
>
> typedef void (*TYPE_Report)(const char* message, const char* details = 0);
>
> This was accepted by MS Visual C++ 6.0, but is rejected in Visual Studio
> .NET 2003.
> I assume that this change might be because Visual Studio .NET is more C++
> standard compliant than previous versions were.
> Is this correct?
Yes.
>
> Is there any way to use default parameters for function types?
Not that I know of.
================================================== =================
ISO/IEC 14882:1998(E)
8.3.6 Default arguments
3 A default argument expression shall be specified only in the
parameter-*declaration*-clause of a function declaration or in
a template*-parameter (14.1). If it is specified in a parameter*-
declaration*-clause, it shall not occur within a declarator or
abstract*-declarator of a parameter*-declaration.(8
(8

This means that default arguments cannot appear, for
example, in declarations of pointers to functions, references
to functions, or typedef declarations.
================================================== =================
-Mike