problem with std::is_abstract for unique_ptr with allocator inside struct definition
demihamster opened this issue · 1 comments
demihamster commented
Hi,
not sure if I'm somehow at fault but -
minimal example doesn't compile with visual studio 2019:
VC\Tools\MSVC\14.29.30133\include\type_traits(517,36): error C2139: 'Node': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_abstract'
happens because Node is not yet defined when the deleter checks with assertion if the type is abstract
namespace mem = foonathan::memory;
using allocator_t = mem::memory_pool<>;
struct Node
{
int v;
using partition_t = mem::unique_ptr<Node, allocator_t>;
partition_t ptr;
};
foonathan commented
Good catch, should be fixed now.