作者:处女冰水洗尘 | 来源:互联网 | 2023-08-22 03:18
OS: OSX 10.10.2
ERROR MESSAGE:
1 2 3 4 5 6 7 8 9
| concurrentqueue.h:366:63: error: no template named 'has_trivial_destructor' in namespace 'std'; did you mean
'has_virtual_destructor'?
template struct is_trivially_destructible : std::has_trivial_destructor { };
~~~~~^~~~~~~~~~~~~~~~~~~~~~
has_virtual_destructor
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:971:51: note: 'has_virtual_destructor' declared here
template struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
^
|
Compiler:
1 2 3 4 5
| $ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix |
Realted Macros :
: 4
: 2
: 1
My fix :
line 362: ( https://github.com/cameron314/concurrentqueue/blob/master/concurrentqueue.h#L362 )
1 2
| - #if !defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+ #if defined(__APPLE__) || !defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) |
It works, but I think it seems too ugly.
该提问来源于开源项目:cameron314/concurrentqueue
My pleasure, your code is really useful and make some contribution for this project is also means help myself.