cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

feat: accept type arguments in function calls

Open JohelEGP opened this issue 2 years ago • 4 comments

Resolves https://github.com/hsutter/cppfront/discussions/628#discussioncomment-8050552.

JohelEGP avatar Jan 08 '24 19:01 JohelEGP

From #628:

But what about offsetof (https://en.cppreference.com/w/cpp/types/offsetof)? And more generally the compiler built-ins? Unfortunately, generally supporting function type arguments seems like it would require typename.

Can you elaborate with examples where this is used? I'm not seeing the use cases in the PR code shown so far, unless the answer to my first question about sizeof(type ...) is that the type alters the meaning somehow.

hsutter avatar Jan 09 '24 00:01 hsutter

From #628:

But what about offsetof (https://en.cppreference.com/w/cpp/types/offsetof)? And more generally the compiler built-ins? Unfortunately, generally supporting function type arguments seems like it would require typename.

Can you elaborate with examples where this is used? I'm not seeing the use cases in the PR code shown so far, unless the answer to my first question about sizeof(type ...) is that the type alters the meaning somehow.

I wanted to try this, but I think -Werror/\W4 would make this hard. https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html reads:

(The -pedantic option directs GCC to print a warning message if any of these features is used.)

JohelEGP avatar Jan 09 '24 00:01 JohelEGP