coolxv/cpp-stub

ACCESS_PRIVATE_STATIC_FIELD lead to build failure when the static member is initialized out of the class body

1shuaiwpeng opened this issue · 1 comments

remove the line "Type Class::Name;" can fix the failure

/*#define ACCESS_PRIVATE_STATIC_FIELD(Class, Type, Name)
**Type Class::Name; / *
#define ACCESS_PRIVATE_STATIC_FIELD(Class, Type, Name)
PRIVATE_ACCESS_DETAIL_ACCESS_PRIVATE_STATIC_FIELD(
PRIVATE_ACCESS_DETAIL_UNIQUE_TAG, Class, Type, Name)

another solution is to call the destination macro: PRIVATE_ACCESS_DETAIL_ACCESS_PRIVATE_STATIC_FIELD