Skip to content

Using pointer to member as a template argument is converted to the type of the member #60

@ninkibah

Description

@ninkibah

I wrote some code that uses a pointer to a class member as a template parameter:

pointerToMemberBug.cpp.txt
Sadly, the expanded code is showing as:
#ifdef INSIGHTS_USE_TEMPLATE
template<>
struct Index // instead of struct Index<&Person::age>

t always seems to use the type of the data member as the template type. For example, if I change Person::age to a long, then struct Index is generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions