[cfe-dev] [clang-3.2] unique_ptr: compiler errors
Suman Kar
skarpio at gmail.com
Sat Jun 2 10:45:20 PDT 2012
Hello,
The following:
#include <memory>
int main() {
using namespace std;
unique_ptr<int> up( new int( 30 ) );
}
generates:
$ /d/llvm_workspace/build/Debug+Asserts/bin/clang++ -std=c++11 -Wall foo.cpp
-o foo
In file included from vector.cpp:1:
In file included from c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\memory:75:
c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\ext/concurrence.h:228:2: error: no
matching function for call to '_S_destroy'
_S_destroy(&_M_mutex);
^~~~~~~~~~
c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\ext/concurrence.h:273:7: note:
candidate template ignored: substitution failure [with _Rm =
__gthread_recursive_mutex_t]: non-type template argument evaluates to 4,
which cannot be narrowed to type 'bool'
_S_destroy(_Rm* __mx)
^
c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\ext/concurrence.h:282:7: note:
candidate template ignored: substitution failure [with _Rm =
__gthread_recursive_mutex_t]: no member named 'actual' in
'__gthread_recursive_mutex_t'
_S_destroy(_Rm* __mx)
^
c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\ext/concurrence.h:290:7: note:
candidate template ignored: substitution failure [with _Rm =
__gthread_recursive_mutex_t]: no type named '__type' in
'__gnu_cxx::__enable_if<false, void>'
_S_destroy(_Rm* __mx)
^
1 error generated.
I am using clang 3.2 version:
clang version 3.2 (trunk 157115) (llvm/trunk 157155)
Target: i686-pc-mingw32
Thread model: posix
I'd like to know if this is a problem with my installation/gcc/build
issue. Any help will be much appreciated.
Regards,
Suman
More information about the cfe-dev
mailing list