[LLVMbugs] [Bug 11889] New: 'bind' doesn't fail when called with non-callable first argument
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 30 13:59:00 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11889
Bug #: 11889
Summary: 'bind' doesn't fail when called with non-callable
first argument
Product: libc++
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
AssignedTo: hhinnant at apple.com
ReportedBy: hivemaster at hotmail.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
'std::bind(1,2)' should fail, but doesn't. (r149243)
The standard states the following´ for 'std::bind' at 20.8.9.1.2/1
[func.bind.bind]:
template<class F, class... BoundArgs>
unspecified bind(F&& f, BoundArgs&&... bound_args);
Requires: [...] INVOKE(fd, w1, w2, ..., wN) (20.8.2) shall be a valid
expression for some values w1, w2, ..., wN, where N == sizeof...(bound_args).
And at 20.8.2/1, 'INVOKE(f, t1, t2, ..., tN)' is defined as 'f(t1, t2, ...,
tN)' when 'f' is not a member pointer. Clearly, the expression '1(2)' isn't
valid, and as such the 'std::bind' call should fail (in whatever way).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list