<cstdarg> missing things?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

<cstdarg> missing things?

Andreas Wollschlaeger
Hi folks,

last night I attempted to switch one of my projects from using

#include <stdarg.h>

to

#include <cstdarg>

when I realized that MinGW's version of <cstdarg> only puts "va_list" in
the std namespace, but not the related va_start and va_end functions:

-- snip --
namespace std
{
  using ::va_list;
}
-- snip --

Is there any particular reason why this is so? Just peeked into the
corresponding include from Visual C++, this does the same and only puts
va_list in the std namespace.


Cheers
Andreas





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: <cstdarg> missing things?

Роман Донченко
"Andreas Wollschlaeger" <[hidden email]>
сообщил/сообщила в новостях следующее:
news:[hidden email]...

> Hi folks,
>
> last night I attempted to switch one of my projects from using
>
> #include <stdarg.h>
>
> to
>
> #include <cstdarg>
>
> when I realized that MinGW's version of <cstdarg> only puts "va_list" in
> the std namespace, but not the related va_start and va_end functions:
>
> -- snip --
>
> Is there any particular reason why this is so? Just peeked into the
> corresponding include from Visual C++, this does the same and only puts
> va_list in the std namespace.

va_start, va_end, va_arg and va_copy are macros. You can't put macros in
namespaces.

Roman.




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.