[Development] Make support vor __VA_ARGS__ in preprocessor a requirement?

Thiago Macieira thiago.macieira at intel.com
Fri Jan 10 18:01:02 CET 2014


On sexta-feira, 10 de janeiro de 2014 13:47:34, Koehne Kai wrote:
> So, I'm wondering, can anybody check for the Intel compiler whether it cares
> about the C++ standard when it comes to variadic macros? If not, do we
> still support toolchains that do not handle variadic macros?

It's supported in C++98 mode too.

$ icc -E -xc++ -std=c++98 - <<<'#define foo(x, ...) bar(x, __VA_ARGS__)
foo(1)
foo(1, 2)
foo(1,2,3)'
# 1 "-"

bar(1, )
bar(1, 2)
bar(1, 2,3)

Since at least 13.0, but it dates from way before. I don't have older 
compilers installed to check.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140110/4544abbf/attachment.sig>


More information about the Development mailing list