You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
Extended Description
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
int main()
{
std::pointer_safety d ;
d = std::get_pointer_safety();
}
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.
The text was updated successfully, but these errors were encountered: