[Llvm-bgq-discuss] Does bgclang++11 implement std::unique_ptr<>?

Patrick E Gartung gartung at fnal.gov
Mon Jul 11 14:22:58 CDT 2016


Hi Mark,

I double checked and the main cpp file does include it but not the header file and the header file is included before <memory>. I think re-ordering the includes should fix this. Have to wait until vesta comes back to test this.

#include "WaitingTaskList.h"
#include <iostream>
#include <cassert>
#include <memory>
#include “ThreadingHelpers.h"


From: Mark Abraham <mark.j.abraham at gmail.com<mailto:mark.j.abraham at gmail.com>>
Date: Monday, July 11, 2016 at 2:15 PM
To: Patrick Gartung <gartung at fnal.gov<mailto:gartung at fnal.gov>>, "llvm-bgq-discuss at lists.alcf.anl.gov<mailto:llvm-bgq-discuss at lists.alcf.anl.gov>" <llvm-bgq-discuss at lists.alcf.anl.gov<mailto:llvm-bgq-discuss at lists.alcf.anl.gov>>
Subject: Re: [Llvm-bgq-discuss] Does bgclang++11 implement std::unique_ptr<>?

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<mailto: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<mailto: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/81f393b5/attachment.html>


More information about the llvm-bgq-discuss mailing list