[libcxx] r188413 - Relax complete-type check for functions and function pointers to allow void return type. This bug was exposed by Eli Friedman's commit to clang r188324. Anywhere this version of clang ships, this libc++ fix must follow. However this fix is compatible with previous clangs, and so this libc++ doesn't need to wait for this clang.

Eli Friedman eli.friedman at gmail.com
Wed Aug 14 15:40:16 PDT 2013


On Wed, Aug 14, 2013 at 2:28 PM, Howard Hinnant <hhinnant at apple.com> wrote:

> Author: hhinnant
> Date: Wed Aug 14 16:28:31 2013
> New Revision: 188413
>
> URL: http://llvm.org/viewvc/llvm-project?rev=188413&view=rev
> Log:
> Relax complete-type check for functions and function pointers to allow
> void return type.  This bug was exposed by Eli Friedman's commit to clang
> r188324.  Anywhere this version of clang ships, this libc++ fix must
> follow.  However this fix is compatible with previous clangs, and so this
> libc++ doesn't need to wait for this clang.
>
> Modified:
>     libcxx/trunk/include/type_traits
>
> Modified: libcxx/trunk/include/type_traits
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=188413&r1=188412&r2=188413&view=diff
>
> ==============================================================================
> --- libcxx/trunk/include/type_traits (original)
> +++ libcxx/trunk/include/type_traits Wed Aug 14 16:28:31 2013
> @@ -2928,12 +2928,22 @@ struct __check_complete<_Rp (*)(_Param..
>  {
>  };
>
> +template <class ..._Param>
> +struct __check_complete<void (*)(_Param...)>
> +{
> +};
> +
>  template <class _Rp, class ..._Param>
>  struct __check_complete<_Rp (_Param...)>
>      : private __check_complete<_Rp>
>  {
>  };
>
> +template <class ..._Param>
> +struct __check_complete<void (_Param...)>
> +{
> +};
> +
>  template <class _Rp, class _Class, class ..._Param>
>  struct __check_complete<_Rp (_Class::*)(_Param...)>
>      : private __check_complete<_Class>
>
>
>
Do we need a similar fix for member function pointers?  Or do we not check
the return types for those?

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130814/6d1e9f82/attachment.html>


More information about the cfe-commits mailing list