Skip to content
Snippets Groups Projects
Commit 550045e5 authored by Oliver Sander's avatar Oliver Sander
Browse files

Follow the stl standard: the default constructor of a shared_ptr creates a...

Follow the stl standard: the default constructor of a shared_ptr creates a NULL pointer, and does NOT allocate memory

[[Imported from SVN: r5654]]
parent 10e15a9f
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ namespace Dune
template<class T>
inline shared_ptr<T>::shared_ptr()
{
rep_ = new PointerRep;
rep_ = NULL;
}
template<class T>
......
......@@ -14,7 +14,7 @@ int main(){
using namespace Dune;
int ret=0;
{
shared_ptr<double> b;
shared_ptr<double> b(new double(42.0));
{
shared_ptr<double> d(b);
*b = 7;
......
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