Skip to content

Empty argument list #9

@Jiboo

Description

@Jiboo
#define TRANSFORM_DECLTYPE(MInput) decltype(MInput)
#define DECLTYPE_LIST(...) MAP_LIST(TRANSFORM_DECLTYPE, __VA_ARGS__)
DECLTYPE_LIST(a,b,c)
DECLTYPE_LIST()

Results in:

decltype(a), decltype(b), decltype(c)
decltype()

I expected the case where no arguments are passed to expand to nothing, note that MAP has the same behaviour.
I fixed for my case by changing definition of TRANSFORM_DECLTYPE to #define TRANSFORM_DECLTYPE(...) __VA_OPT__(decltype(__VA_ARGS__)) but that would only work for C++2a compilers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions