Comments (2)
Well I got it working by creating a new storage type like dyno::non_owning_storage
for Boost::TE.
struct viewer_storage {
template <class T, class T_ = std::decay_t<T> >
constexpr explicit viewer_storage(T &&t, te::detail::void_ptr &ptr) noexcept {
ptr.reset(&t,
[]([[maybe_unused]] void *ptr) {},
[](void *ptr) -> void * { return static_cast<T_ *>(ptr); });
}
};
Here's an example to see it working : https://wandbox.org/permlink/9rADpyr92if0Z7CI
And in Compiler Explorer : https://godbolt.org/g/ERscKM
from te.
This issue is fixed with this commit #17
from te.
Related Issues (19)
- Crash when inheriting with local_storage
- How to return `std::ostream&` from type erased function? HOT 2
- The compiler explorer link does not work
- Compilation of Test fails on gcc 8.2 HOT 2
- "Better inlining" from README compilation failed
- Question on void_ptr
- Possible to have a non-const inteface?
- Copying an object containing a poly object does not copy
- Question: maturity HOT 2
- No support for move-only types
- windows msvc2019
- Bug : segmentation fault HOT 8
- Does not compile on certain versions of gcc and clang HOT 1
- Compilation of examples failed on gcc 9, 10 and 11 HOT 18
- Unable to return a const reference on the interface
- Looking for a mechanism to make poly comparable, and/or to be able to do runtime casts
- problem with instantiation of templated method, probably detection problem
- Cannot reserve, resize nor emplace_back in std::vector<te::poly<Type>> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from te.