[libcxx] Problem with quick_exit test

Hi,

test/language.support/support.start.term/quick_exit.pass.cpp uses std::at_quick_exit() to test quick exit functionality. But looking at include/cstdlib header inside libcxx at_quick_exit function is not defined in the std namespace.

Changing the test to use at_quick_exit(f) without the namespace fixes the build for me.

Is this an oversight or am I missing something?

Thanks,
ismail

It sounds like <__config> needs to turn on _LIBCPP_HAS_QUICK_EXIT for your platform. Currently <__config> says:

#if defined(__FreeBSD__) && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
#define _LIBCPP_HAS_QUICK_EXIT

Perhaps you could test & submit a patch to fix this?

Howard

Fencepost comment - Instead of a platform #if - could this be turned into a feature check? (I'm just curious if _LIBCPP_HAS_QUICK_EXIT is really limited to FreeBSD only..

I've implemented auto-detection of the existence of namespace scope functions before, but it was a long time ago, and was pretty messy. I'm open to suggestions on how to do the feature check.

Howard

Hi,

quick_exit_linux.patch (493 Bytes)

Thanks, Committed revision 181612.

Howard