https://llvm.org/bugs/show_bug.cgi?id=26961
Bug ID: 26961 Summary: non-standard implementation issue Product: libc++ Version: 3.8 Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: ionelpopesc...@yahoo.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Classification: Unclassified The C++11 standard defines pointer_safety as: enum class pointer_safety { relaxed, preferred, strict }; But, currently pointer_safety is implemented as a struct. This causes that the following test to fail, because it is initialized by a constructor that takes an int: #include <memory> int main() { std::pointer_safety d ; d = std::get_pointer_safety(); return 0; } test.cpp:5:25: error: no matching constructor for initialization of 'std::pointer_safety' std::pointer_safety d ; ^ /usr/include/c++/v1/memory:5406:5: note: candidate constructor not viable: requires single argument '__v', but no arguments were provided pointer_safety(__lx __v) : __v_(__v) {} ^ /usr/include/c++/v1/memory:5394:25: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided struct _LIBCPP_TYPE_VIS pointer_safety ^ /usr/include/c++/v1/memory:5394:25: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided 1 error generated. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs