This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC support for C++ noexcept
- From: Jeffrey Walton <noloader at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: Edward Diener <eldlistmailingz at tropicsoft dot com>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 27 Jul 2015 11:08:02 -0400
- Subject: Re: GCC support for C++ noexcept
- Authentication-results: sourceware.org; auth=none
- References: <CAH8yC8nchUG7WGQEkg-nD0jvG2sOCaZhmfUTxrVz7d=c7eZXmA at mail dot gmail dot com> <20150727015526 dot GB58373 at unpythonic dot net> <CAH8yC8=PJLmO+Z-4L804wqTj2o3_W93ZynyUg6Hjj27EAChyfw at mail dot gmail dot com> <mp4bdj$rcd$1 at ger dot gmane dot org> <CAH6eHdS5818Hmd6TX5dyzfw8X3Aa1CyvvgNkDQb2hKSgThMoew at mail dot gmail dot com> <mp5csf$5pa$1 at ger dot gmane dot org> <CAH8yC8=zHevEaLnFU_MBm0rJdr7A+8HUodOhyrXddSkeUvKb+g at mail dot gmail dot com> <CAH6eHdQpBfgxcq05mJtM7hdsNQF9E4bzGHx1ykG6gPf6g3Sndw at mail dot gmail dot com>
- Reply-to: noloader at gmail dot com
On Mon, Jul 27, 2015 at 10:58 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 27 July 2015 at 15:36, Jeffrey Walton wrote:
>> __GXX_EXPERIMENTAL_CXX0X breaks on Apple platforms and some Clang
>> based gear. Been there, done that....
>
> Breaks in what way?
You are the one who helped me through it years ago :)
It breaks the compile. You helped us with the out GXX_EXPERIMETAL
guard. testing on Apple and Clang revealed the need for the inner
guard (from https://code.google.com/p/owasp-esapi-cplusplus/source/browse/trunk/esapi/util/zAllocator.h):
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7
// Why is Apple defining __GXX_EXPERIMENTAL_CXX0X__
# if !(defined(ESAPI_OS_APPLE) || defined(ESAPI_OS_ANDROID))
template<typename U, typename... Args>
void construct(U* p, Args&&... a)
{
::new ((void*)p) U(std::forward<Args>(a)...);
}
template<typename U>
void destroy(U* p)
{
ASSERT(p);
if(p)
p->~U();
}
# endif
#endif
Jeff