defer_defarg_parsing

Defers the parsing of default arguments in member functions.

Syntax

#pragma defer_defarg_parsing on | off

Targets
All platforms.
Remarks

To be accepted as valid, some default expressions with template arguments will require additional parentheses. For example, the following source code generates an error:

template<typename T,typename U> struct X { T t; U u; };

struct Y {
// the following line is not accepted, and generates
// an error with defer_defarg_parsing on
void f(X<int,int> = X<int,int>());
};

While this version will not:

template<typename T,typename U> struct X { T t; U u; };

struct Y {
// following line is OK,
// if default argument is parenthesized
void f(X<int,int> = (X<int,int>()) );
};

This pragma does not correspond to any panel setting. To check this setting, use __option (defer_defarg_parsing). The default setting is on.