Skip to content
Snippets Groups Projects
Commit 3afb9c91 authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

[shared_ptrtest] Check that default-constructed shared_ptr values can be

copied.

[[Imported from SVN: r6321]]
parent b68e2e0d
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,13 @@ int main(){
std::cout << "=== checking shared_ptr type: " << className(foo)
<< std::endl;
// make sure default-constructed shared_ptr values can be copied
{
shared_ptr<int> bar(foo);
shared_ptr<int> baz;
baz = foo;
}
// test cast-to-bool
if (foo) {
std::cout << "Default constructor doesn't create a NULL pointer!" << std::endl;
......
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