http://llvm.org/bugs/show_bug.cgi?id=20084
Bug ID: 20084
Summary: std::is_function<void()const> faild
Product: libc++
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
On clang HEAD and libcxx trunk, complile failed.
source:
#include<type_traits>
static_assert(std::is_function<void()const>{}, "");
int main(){}
compiler messages:
In file included from prog.cc:1:
/usr/local/libcxx-head/include/c++/v1/type_traits:438:83: error: no matching
function for call to '__source'
: public integral_constant<bool,
sizeof(__libcpp_is_function_imp::__test<_Tp>(__libcpp_is_function_imp::__source<_Tp>()))
== 1>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/libcxx-head/include/c++/v1/type_traits:443:14: note: in
instantiation of template class 'std::__1::__libcpp_is_function<void () const,
false>' requested here
: public __libcpp_is_function<_Tp> {};
^
prog.cc:3:15: note: in instantiation of template class
'std::__1::is_function<void () const>' requested here
static_assert(std::is_function<void()const>{}, "");
^
/usr/local/libcxx-head/include/c++/v1/type_traits:429:28: note: candidate
template ignored: substitution failure [with _Tp = void () const]: reference to
function type 'void () const' cannot have 'const' qualifier
template <class _Tp> _Tp& __source();
~~~ ^
1 error generated.
It seems problem point is __libcpp_is_function_imp::__source function template
and changing clang behavior 3.4 to HEAD.
please see: http://melpon.org/wandbox/permlink/7goraqrqNXsdOdLK
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs