emscripten-core / emscripten-core/emscripten
unique_ptr defined twice
Open
embind
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Declaring a smart constructor with unique pointer leads to the following error:
BindingError {name: "BindingError", message: "Cannot register type 'UniqueFoo' twice", stack: "BindingError: Cannot register type 'UniqueFoo…http://localhost:1234/render/appWASM.js:12004:63)"}
the constructor is bound thus:
```
emscripten::class_("Foo")
.smart_ptr_constructor("UniqueFoo", &std::make_unique)
```
Also, if I understand the tests correctly, there might not be any tests for make_unique, only for make_shared.
Contributor guide
Assessment
This issue has not been assessed yet.