Skip to content

Having two or more indirect conventions will make proxy 8 bytes larger than expected in MSVC #123

@mingxwa

Description

@mingxwa

The following code compiles with clang and GCC, but won't compile with MSVC:

#include <proxy/proxy.h>

PRO_DEF_MEM_DISPATCH(MemFoo, Foo);
PRO_DEF_MEM_DISPATCH(MemBar, Bar);

struct F : pro::facade_builder
  ::add_convention<MemFoo, void()>
  ::add_convention<MemBar, void()>
  ::build {};

int main() {
  static_assert(sizeof(pro::proxy<F>) == 3 * sizeof(void*));
}

Affected by a bug in MSVC: https://developercommunity.visualstudio.com/t/C-attribute-msvc::no_unique_address/10688578

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingexternal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions