-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
Expected Behavior
We expect the following to work.
Actual Behavior
We get a segmentation fault.
It breaks when using local_storage and using move semantics.
The library just moves or swaps the underlying pointers. That won't work. Explicit move constructors MUST be called.
So I believe void_ptr should be upgraded to include:
using ptr_t = void *;
using del_t = void (*)(ptr_t);
using copy_t = ptr_t (*)(ptr_t);
using move_t = ptr_t(*)(ptr_t);
ptr_t ptr;
del_t del;
copy_t copy;
move_t move;
Steps to Reproduce the Problem
Run the godbolt link.
Specifications
Run on any system and it will break.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels