[LLVMbugs] [Bug 19196] New: Premature instantiation of special member function declarations
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 19 11:45:19 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19196
Bug ID: 19196
Summary: Premature instantiation of special member function
declarations
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: dblaikie at gmail.com
CC: chandlerc at gmail.com, dgregor at apple.com,
llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang seems to prematurely instantiate the declaration of the copy constructor
of std::function<bar()> when seen in the definition of 'foo' below. This causes
Clang to reject the following (due to what we believe is a libstdc++ bug) under
BUG1 (and BUG2). GCC only rejects BUG2 but accepts BUG1.
Are we allowed to instantiate that member function declaration?
#include <functional>
#include <type_traits>
struct bar;
#if BUG1
struct foo { std::function<bar ()> f; };
#elif BUG2
int i = std::is_copy_constructible<std::function<bar()>>::value;
#else
std::function<bar ()> b;
#endif
struct bar { };
int main() {
std::function<bar ()> g([] { return bar(); });
}
--
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/20140319/3c3c00a0/attachment.html>
More information about the llvm-bugs
mailing list