Boost logo

Boost :

Subject: Re: [boost] [type_traits] VC++ and vararg function/mmeber functions and varargs
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2013-10-09 15:51:02

> __vectorcall can be applied to member functions.

[Edward Diener]
> "Using the /Gv compiler option causes each function in the module to
> compile as __vectorcall unless the function is a member function, is
> declared with a conflicting calling convention attribute, uses a vararg
> variable argument list, or has the name main."

That's different.

What I said is that __vectorcall can be applied to member functions, i.e. directly. What MSDN is saying is that /Gv changes the default calling convention to __vectorcall for non-member functions, but doesn't affect member functions.

As a library author, the behavior of the calling convention switches doesn't really matter. What a library needs to do is provide overloads/specializations for all possible calling conventions, whether they've been directly specified or are coming from a default. What the switches do force library authors to do is to explicitly mark *all* overloads/specializations - you can't leave one unmarked and then specify __stdcall/__fastcall/etc. for the others, because that'll result in duplicates under Gr/Gz/etc. (Except for varargs, which are completely immune to everything.)


Boost list run by bdawes at, gregod at, cpdaniel at, john at