incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: MSVC8 CRT "Secure Template Overloads" feature and stdcxx
Date Mon, 02 Jul 2007 19:49:34 GMT
Martin Sebor wrote:
> Farid Zaripov wrote:
>>> -----Original Message-----
>>> From: Martin Sebor [] Sent: Wednesday, June 
>>> 13, 2007 6:24 PM
>>> To:
>>> Subject: Re: MSVC8 CRT "Secure Template Overloads" feature and stdcxx
>>>>   Since va_list can be anything, we need to pass va_list type in 
>>>> function call.
>>>> We can add function template <class T> get_t () { T t; 
>>> return t; } to
>>>> the and use the followinf declaration: 
>>>> vsprintf((char*)0,0,get_t<va_list>())
>>>> in
>>> Wouldn't vsprintf((char*)0,0,va_list()) work?
>>   I think this should work.
>>> My concern here is with the va_list name: Is it required to be 
>>> declared in the same header as the functions that use it?
>>   On gcc 3.4.4/Cygwin the va_list type is not defined in stdio.h.
> Right. The C standard requires that <stdarg.h> be #included
> before calling vsnprintf(). To do what you want you'd need
> to find a way (ideally a general mechanism) to also #include
> <stdarg.h> in these tests.

So what's the status of this improvement? I didn't mean to shoot
it down completely, just point out the problem with it on other
platforms. Since this is an MSVC-specific feature it wouldn't be
completely inappropriate to devise an MSVC-specific solution for


View raw message