[LLVMbugs] [Bug 20084] New: std::is_function<void()const> faild
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jun 19 19:53:53 PDT 2014
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: unassignedclangbugs at nondot.org
Reporter: y121516 at gmail.com
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140620/275eaa69/attachment.html>
More information about the llvm-bugs
mailing list