Default parameters in the template function

Default parameters in the template function

vkomarov的头像

Hello,

I have a template function defined as:
void SetStrings (const CString* pPrefix, const CString* pSeparator = NULL, const CString* pSuffix = NULL);

But compiler complains about the following code:

Z:EDevReusablesCommonDisplayNMLabeledPipe.cpp(279): error #165: too few arguments in function call
LabelInfo.eTimeSlot.SetStrings (&eTimeSlotFieldName, &eRangeDash);

It looks like, for some reason, it's missing that the last two arguments are the default ones.

Please advice what I am missing here.
I am using 7.1.010 build.

Regards,

Vladimir

2 帖子 / 0 new
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
Jennifer J. (Intel)的头像

You should report this to Premier Support because it requires more investigation on it.

Also please provide the NMLabeledPipe.i file of "NMLabeledPipe.cpp", you can get it with
>> icl -c -EP -P NMLabeledPipe.cpp

And attach this .i file to the issue report. Or if you can attach the .i file to this post and I'll look at it.

Thanks,
Jennifer

登陆并发表评论。