On Mon, May 5, 2014 at 10:55 AM, Joerg Sonnenberger <[email protected] > wrote:
> On Mon, May 05, 2014 at 05:39:12PM +0000, Logan Chien wrote: > > To allow the compilation with gcc, we can't use the > > __has_feature(noexcept) to detect the existence of noexcept > > keyword. We should use __cplusplus >= 201103L instead. > > I don't think this is correct. Shouldn't it use noexcept if *either* the > feature exists OR the language is C++11? The __cplusplus check is correct here: what we're really testing is whether we have the C++11 rule that destructors are implicitly noexcept or not (the check that 'noexcept' works is incidental). In any case, __has_feature(noexcept) will only be true if we're in C++11-or-later mode, because __has_feature looks for features that are part of the currently-enabled language mode. => Patch LGTM.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
