Skip to content
Snippets Groups Projects
Commit 94ae4a38 authored by Markus Blatt's avatar Markus Blatt
Browse files

[shared_ptr] Introduced an error message that explains why the test fails for gcc <4.6

[[Imported from SVN: r7083]]
parent 36f84c4b
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,13 @@ int main(){
assert(bar);
// test constructor from nullptr
#if defined(SHARED_PTR_HEADER) && !defined(HAVE_NULLPTR)
#error Construction of shared_ptr from a nullptr will not work as compiler
#error does not support the latter.
shared_ptr<double> bar_null=shared_ptr<double>();
#else
shared_ptr<double> bar_null(nullptr);
#endif
assert(!bar_null);
assert(!bar_null.get());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment