User avatar
horeaper
Topic Author
Posts: 34
Joined: 22 Sep 2014, 12:50

NsCore/Exception.h failed to compile under VS2013

28 Sep 2014, 15:43

error C2039: 'copy_exception' : is not a member of 'std'
std::copy_exception was used in tbb_exception.h, line 350

AFAIK, VS2013 doesn't have this, the C++x0 std::copy_exception was renamed to std::make_exception_ptr in final version of C++11 standard.

Update: After digging the header file a little, I found that defining NS_SINGLE_THREADED did the trick. But I don't know if I should do that :?
 
User avatar
jsantos
Site Admin
Posts: 3919
Joined: 20 Jan 2012, 17:18
Contact:

Re: NsCore/Exception.h failed to compile under VS2013

28 Sep 2014, 19:59

Hi!

We started to support VS2013 in noesisGUI v1.2. I see the following change for the file tbb_exception.h:
Index: tbb_exception.h
===================================================================
--- tbb_exception.h	(.../trunk/3rdParty/TBB/local/include/tbb/tbb_exception.h)	(revision 4998)
+++ tbb_exception.h	(.../branches/1.2/3rdParty/TBB/local/include/tbb/tbb_exception.h)	(revision 4998)
@@ -347,7 +347,7 @@
 
 private:
     tbb_exception_ptr ( const std::exception_ptr& src ) : my_ptr(src) {}
-    tbb_exception_ptr ( const captured_exception& src ) : my_ptr(std::copy_exception(src)) {}
+    tbb_exception_ptr ( const captured_exception& src ) : my_ptr(std::make_exception_ptr(src)) {}
 }; // class tbb::internal::tbb_exception_ptr
 
 } // namespace internal
Being an easy change I will apply this patch to v1.1.

Thanks!

Who is online

Users browsing this forum: Semrush [Bot] and 5 guests