[Llvm-bgq-discuss] Does bgclang++11 implement std::unique_ptr<>?
Mark Abraham
mark.j.abraham at gmail.com
Mon Jul 11 14:15:42 CDT 2016
Hi,
My C++11 code using std::unique_ptr compiles fine. Did you #include
<memory>?
Mark
On Mon, Jul 11, 2016 at 9:13 PM Patrick E Gartung <gartung at fnal.gov> wrote:
> Hi,
>
> I am trying to compile code on Vesta that uses c++14’s std::unique_ptr<>
> and I get the error below. Does bgclang++11 support this? Is the definition
> is a non-standard header?
>
> Patrick Gartung
>
>
>
>
>
> [ 5%] Building CXX object
> TBBProcessingDemo/CMakeFiles/TBBFrameworkCore.dir/TBBFrameworkCore/WaitingTaskList.cpp.o
>
> cd /home/gartung/build/TBBProcessingDemo &&
> /soft/compilers/bgclang/wbin/bgclang++11 -DTBBFrameworkCore_EXPORTS
> -I/home/gartung/toy-mt-framework/BusyWaitCalibration
> -I/home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore
> -I/soft/libraries/boost/current/cnk-bgclang++11/current/include
> -I/home/gartung/tbb41_20130314oss/include -fPIC -stdlib=libc++ -fopenmp
> -std=c++14 -fPIC -o
> CMakeFiles/TBBFrameworkCore.dir/TBBFrameworkCore/WaitingTaskList.cpp.o -c
> /home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTaskList.cpp
>
> In file included from
> /home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTaskList.cpp:10:
>
> In file included from
> /home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTaskList.h:14:
>
> */home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTask.h:27:16:
> **error: **no member named 'unique_ptr' in namespace*
>
> * 'std'*
>
> std::unique_ptr<std::exception_ptr> temp{new
> std::exception_ptr{iPtr}};
>
> * ~~~~~^*
>
> */home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTask.h:27:45:
> **error: **expected '(' for function-style cast or type*
>
> * construction*
>
> std::unique_ptr<std::exception_ptr> temp{new
> std::exception_ptr{iPtr}};
>
> * ~~~~~~~~~~~~~~~~~~^*
>
> */home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTask.h:27:47:
> **error: **use of undeclared identifier 'temp'*
>
> std::unique_ptr<std::exception_ptr> temp{new
> std::exception_ptr{iPtr}};
>
> * ^*
>
> */home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTask.h:29:55:
> **error: **use of undeclared identifier 'temp'*
>
> if( m_ptr.compare_exchange_strong(expected, temp.get()) ) {
>
> * ^*
>
> */home/gartung/toy-mt-framework/TBBProcessingDemo/TBBFrameworkCore/WaitingTask.h:30:14:
> **error: **use of undeclared identifier 'temp'*
>
> temp.release();
>
> * ^*
>
> 5 errors generated.
>
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alcf.anl.gov/pipermail/llvm-bgq-discuss/attachments/20160711/db958a5d/attachment-0001.html>
More information about the llvm-bgq-discuss
mailing list