VC++ 2008/2010: is throw() or __declspec(nothrow) a better choice?
问题 When using VC++ 2008 and 2010, which marker is better to use to indicate a function won't throw exceptions: throw() (C++ standard) __declspec(nothrow) (MS extension) I read a few older forum discussions where people said that using throw() may actually force the compiler to generate additional code to catch exceptions in case the function does throw (against the marker). Their advice is not to use throw() but use __declspec(nothrow) instead, since the compiler can actually use it for