<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Dec 23, 2013, at 1:16 PM, Howard Hinnant <<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>> wrote:<br><div><blockquote type="cite"><div style="font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>Two further questions:<br><br>1. Do these keywords come with __has_feature tests (like __is_class does)?  If not, they should.<br><br>2.  If they do come with __has_feature tests, how about libc++ doing the same thing it does for is_class et al.?<br><br>#if !__has_feature(is_void)<br><br>template <class _Tp> struct __is_void       : public false_type {};<br>template <>          struct __is_void<void> : public true_type {};<br><br>#endif  // !__has_feature(is_void)<br><br>template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_void<br>   : public __is_void<typename remove_cv<_Tp>::type> {};<br><br>That way we don't need major surgery.  We avoid the conflict if it exists.  And we take advantage of the compiler intrinsic if it exists.</div></blockquote><br></div><div>This sounds good to me, but I think it’ll be a bit more involved than that:</div><div><br></div><div>#if !__has_feature(is_void)<br><br>template <class _Tp> struct __is_void       : public false_type {};<br>template <>          struct __is_void<void> : public true_type {};<br><br>template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_void<br>   : public __is_void<typename remove_cv<_Tp>::type> {};</div><div><br></div><div>#else</div><div><br></div><div>template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_void</div><div><div>   : public integral_constant<bool, __is_void(typename remove_cv<_Tp>::type)>;</div><div><br></div></div><div>#endif  // !__has_feature(is_void)<br><br>— Marshall</div><div><br></div></body></html>