Comments (6)
Hi @engun , thanks for reporting this.
I'm not using CLion, but I just made a change that I think may fix this. Can you try the latest version of the repo?
from parallel-hashmap.
I just tried it. It's still the same. maybe more detailed information would help.
begin----------------------------------------------------------------------------------------------------------
In template: constexpr variable 'kFirst' must be initialized by a constant expression
error occurred here
in instantiation of static data member 'phmap::priv::memory_internal::OffsetOf<phmap::priv::memory_internal::IsLayoutCompatible<unsigned long long, unsigned int>::Pair>::kFirst' requested here
in instantiation of static data member 'phmap::priv::memory_internal::IsLayoutCompatible<unsigned long long, unsigned int>::value' requested here
in instantiation of function template specialization 'phmap::priv::map_slot_policy<unsigned long long, unsigned int>::transfer<std::allocator<std::pair<const unsigned long long, unsigned int>>>' requested here
in instantiation of function template specialization 'phmap::priv::FlatHashMapPolicy<unsigned long long, unsigned int>::transfer<std::allocator<std::pair<const unsigned long long, unsigned int>>>' requested here
in instantiation of function template specialization 'phmap::priv::hash_policy_traits<phmap::priv::FlatHashMapPolicy<unsigned long long, unsigned int>>::transfer_impl<std::allocator<std::pair<const unsigned long long, unsigned int>>, ph... (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
in instantiation of function template specialization 'phmap::priv::parallel_hash_set<4, phmap::priv::raw_hash_set, std::shared_mutex, phmap::priv::FlatHashMapPolicy<unsigned long long, unsigned int>, phmap::Hash<uint64_t>, phmap::EqualT...
in instantiation of function template specialization 'phmap::priv::parallel_hash_map<4, phmap::priv::raw_hash_set, std::shared_mutex, phmap::priv::FlatHashMapPolicy<unsigned long long, unsigned int>, phmap::Hash<uint64_t>, phmap::EqualT...
in instantiation of function template specialization 'phmap::priv::parallel_hash_map<4, phmap::priv::raw_hash_set, std::shared_mutex, phmap::priv::FlatHashMapPolicy<unsigned long long, unsigned int>, phmap::Hash<uint64_t>, phmap::EqualT...
in instantiation of function template specialization 'phmap::priv::parallel_hash_map<4, phmap::priv::raw_hash_set, std::shared_mutex, phmap::priv::FlatHashMapPolicy<unsigned long long, unsigned int>, phmap::Hash<uint64_t>, phmap::EqualT...
in instantiation of function template specialization 'phmap::priv::parallel_hash_map<4, phmap::priv::raw_hash_set, std::shared_mutex, phmap::priv::FlatHashMapPolicy<unsigned long long, unsigned int>, phmap::Hash<uint64_t>, phmap::EqualT...
:4387:39:
note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
Declaration location: phmap.h
namespace phmap::priv
public:
template<K = key_type, P = Policy, K * = nullptr>
MappedReference<P> parallel_hash_map::operator[](key_arg<K> &&key)
end----------------------------------------------------------------------------------------------------------
from parallel-hashmap.
What compiler are you using within CLion, on what operating system?
from parallel-hashmap.
- Compiler: MSVC
- System: win11 22h2
from parallel-hashmap.
Hum, weird, I cannot reproduce the issue with Visual Studio 2022.
Do you have a custom version of the macro offsetof
in your code? Either that or you use an older compiler which provides a non constexpr
version of offsetof
.
from parallel-hashmap.
Yes, VS doesn't show this error and, in fact, doesn't affect CLION compilation, but my OCD tells me to raise an issue.
after a brief study, this error is from the Clang prompt.
from parallel-hashmap.
Related Issues (20)
- LLDB pretty-printer is buggy HOT 2
- Avoid Memory Reallocations in flat_hash_map clear for Trivial Classes HOT 3
- Suggestion: lazy_emplace_l without last argument HOT 12
- Unused variable warning HOT 2
- question about performance of `at(...)` HOT 4
- Iteration Order Differs on Arm64 Architecture HOT 4
- Very minor optimization: _mm_abs_epi8 instead of _mm_sign_epi8 HOT 1
- Slow in a specific case HOT 20
- asan build on linux failed with memory error HOT 3
- phmap_dump saving a lot more than needed HOT 4
- Thread safe way to check existence of items HOT 8
- is it possible to miss the necessary .cmake in the conda packaging? HOT 1
- nvc++: integer conversion resulted in a change of sign HOT 9
- Need a tag about `reserve` bug HOT 3
- Need help speeding up large hash map HOT 6
- merging maps HOT 8
- Release memory after shrinking HOT 6
- Memory not reclaimed after calling map.clear() HOT 4
- Ability to reset the inner sub map HOT 64
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 parallel-hashmap.