c++ - Use of undeclared identifier 'nothrow'; did you mean 'throw'? memory -


i working on cpp code port 1 application windows mac. while building application in xcode throws error saying:

"use of undeclared identifier 'nothrow'; did mean 'throw'? memory" 

these errors thrown in cpp standard library headers.

below error stack description:

/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.10.sdk/usr/include/c++/4.2.1/memory:83:8: use of undeclared identifier 'nothrow'; did mean 'throw'?  /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.10.sdk/usr/include/c++/4.2.1/string:48:10: in file included /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.10.sdk/usr/include/c++/4.2.1/string:48: 

i searched in internet unable find solution problem. suggestions helpful. why error thrown system header files?

system details:

  • sdk osx 10.10.

  • compiler option used compile application c++ standard library:

    libc++(llvm c++ standard c++11 support. c++ language dialect: gnu++11. compiler c++ : apple llvm 6.0

a throw() specification on functions deprecated in '11 standard, , removed in '17 standard. if clang not support it, guess that intentional choice on developers' part, or compiling in c++17 mode.

the proper thing in modern c++ use noexcept specification. noexcept allows more efficient code generation, in not have perform rtti on thrown exceptions, instead if exception thrown call-frame underneath noexcept-declared function, std::terminate called, short-circuiting crazy std::unexpected() machinery specified '98 standard.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -