Skip to content

Fail to expand macro, comma in inner macro #292

Closed

Description

@danmar

Example code:

template <typename T, typename U>
U add(T num1, U num2) {
return (num1 + num2);
}
#define sum add<int, double>(2,2.5)
#define foo(a, b) a
#define result foo(sum,3)
result

simplecpp output:

11623.cpp:7: syntax error: failed to expand 'result', Wrong number of parameters for macro 'foo'.

Activity

  1. changed the title [-]Fail to expand macro[/-] [+]Fail to expand macro, comma in inner macro[/+] on Oct 5, 2023
  2. added a commit that references this issue on Oct 5, 2023
    a02df88
  3. added a commit that references this issue on Mar 14, 2024
    2f44b77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions