Closed ArekPiekarz closed 6 years ago
Thanks! resize(x)
on vector still doesn't work, is it by design to not have an empty object?
If so, it's worth noting it at least here.
The current compilation error is:
/usr/include/c++/7/bits/stl_construct.h:75: error: no matching function for call to ‘te::v1::poly<Drawable>::poly()’
{ ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's not possible to change internal or external size of std::vector that stores te::poly objects, nor emplace_back objects into it.
Example with reserving space in the vector:
Its compilation fails with:
When we change
reserve
toresize
, we get the same error and additionally this one:When we change the code to test emplace_back with a potentially drawable object:
we get the same error as in the
reserve
case.Environment OS: Ubuntu 17.10 x64 Compiler: GCC 7.2 x64