-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on Centos7 #32
Comments
Hello,
using pointer = T*;
using const_pointer = const T*;
using reference = T&;
using const_reference = const T&;
using size_type = size_t;
using difference_type = ptrdiff_t;
template<typename U>
struct rebind {
using other = StdPolyAlloc<U>;
}; This would emulate old allocator behaviour. |
Thanks for you quick answer. Here is the new log:
|
Ok, part 2 ;) explicit unordered_map( const Allocator& alloc ); // (since C++11) maybe other constructors exists ;) unordered_map( const unordered_map& other, const Allocator& alloc ); // (since C++11)
// or
unordered_map(unordered_map&& other, const Allocator& alloc ); // (since C++11) if any of these constructors exist, than simply change this line: _ptrMap{ {}, StdPolyAlloc<std::pair<const void* const, PLCInfoSerializer>>{memResource}} {} Since GCC4.9 there was some changed to the unordered map, included missing constructor because I have tested bitsery with this version.
But hope this will help. |
Not yet 😞
|
Work in progress! 👍 New log
BTW, you can follow my changes here: master...Geode-solutions:master |
I guess we need to finish implementing remaining allocator methods that was required before c++11 for StdPolyAlloc. |
I hope, that these would be enough in size_t max_size() const noexcept {
return std::numeric_limits<size_t>::max() / sizeof(value_type);
}
void construct(T *p, const T &val) {
new((void *) p) T(val);
}
template<class U, class... Args>
void construct(U *p, Args &&... args) {
new((void *) p) U(std::forward<Args>(args)...);
}
void destroy(T *p) {
p->~T();
}
template<class U>
void destroy(U *p) {
p->~U();
} Hope that helps |
Seems better but still an error.
here is the refenreced line: https://github.com/Geode-solutions/OpenGeode/blob/v4-CI/src/geode/basic/attribute_manager.cpp#L174 |
The problem is in StdMap replace these two lines with this: auto key = bitsery::Access::create<TKey>();
auto value = bitsery::Access::create<TValue>(); The same is in StdSet replace it with: auto key = bitsery::Access::create<TKey>(); I think these are the only two places in project, if my searched correctly :) You can find more information about it on stackoverflow |
There is still some error.. But it is better !
Thank you very much for your help and very quick answers! |
Maybe missing |
Adding the include fixed the first error but not the second one. |
Sorry, missed the other error. explicit PolymorphicContext(MemResourceBase* memResource = nullptr)
:_memResource{memResource},
_baseToDerivedMap{0, BaseToDerivedKeyHashier{}, std::equal_to<BaseToDerivedKey>{}, pointer_utils::StdPolyAlloc<std::pair<const BaseToDerivedKey,
std::shared_ptr<PolymorphicHandlerBase>>>{memResource}},
_baseToDerivedArray{0, std::hash<size_t>{}, std::equal_to<size_t>{}, pointer_utils::StdPolyAlloc<std::pair<const size_t,
std::vector<size_t, pointer_utils::StdPolyAlloc<size_t>>>>{memResource}}
{} I wonder, how many errors still awaits ;) |
It works! 🎉 Thanks a lot for your help! |
I'm glad, that it worked on older compiler as well ;) |
I am trying to use Bitsery5.0.1 on a Centos7 witg gcc4.8.2. I got this error:
Do you have an idea of the origin of this error?
The text was updated successfully, but these errors were encountered: