You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/felix>clang++ -std=c++11 -I. ccx.cpp
In file included from ccx.cpp:2:
./concurrentqueue.hpp:1508:78: error: reinterpret_cast from 'const char ' to 'int *'
casts away qualifiers
...idx) const MOODYCAMEL_NOEXCEPT { return reinterpret_cast<T>(elements) + static_c...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ccx.cpp:3:28: note: in instantiation of member function 'moodycamel::ConcurrentQueue<int,
moodycamel::ConcurrentQueueDefaultTraits>::Block::operator[]' requested here
template class moodycamel::ConcurrentQueue;
This is a stupidity in C++, you'll have to work around it.
reinterpret cast isn't allowed to cast away const.
The fix is simple: use an ordinary C cast: (T*) instead.
The text was updated successfully, but these errors were encountered:
~/felix>clang++ -std=c++11 -I. ccx.cpp
In file included from ccx.cpp:2:
./concurrentqueue.hpp:1508:78: error: reinterpret_cast from 'const char ' to 'int *'
casts away qualifiers
...idx) const MOODYCAMEL_NOEXCEPT { return reinterpret_cast<T>(elements) + static_c...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ccx.cpp:3:28: note: in instantiation of member function 'moodycamel::ConcurrentQueue<int,
moodycamel::ConcurrentQueueDefaultTraits>::Block::operator[]' requested here
template class moodycamel::ConcurrentQueue;
This is a stupidity in C++, you'll have to work around it.
reinterpret cast isn't allowed to cast away const.
The fix is simple: use an ordinary C cast: (T*) instead.
The text was updated successfully, but these errors were encountered: