Skip to content
Snippets Groups Projects
Commit a8c65a5b authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[cleanup] Use <memory> instead of own shared_ptr.hh

parent 890057ee
No related branches found
No related tags found
No related merge requests found
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ARRAYLIST_HH
#define DUNE_ARRAYLIST_HH
#ifndef DUNE_COMMON_ARRAYLIST_HH
#define DUNE_COMMON_ARRAYLIST_HH
#include <array>
#include <cassert>
#include <memory>
#include <vector>
#include <array>
#include "shared_ptr.hh"
#include "iteratorfacades.hh"
namespace Dune
......@@ -194,7 +194,7 @@ namespace Dune
/**
* @brief The allocators for the smart pointer.
*/
typedef typename A::template rebind<shared_ptr<std::array<MemberType,chunkSize_> > >::other
typedef typename A::template rebind<std::shared_ptr<std::array<MemberType,chunkSize_> > >::other
SmartPointerAllocator;
/**
......@@ -210,7 +210,7 @@ namespace Dune
friend class ConstArrayListIterator<T,N,A>;
/** @brief the data chunks of our list. */
std::vector<shared_ptr<std::array<MemberType,chunkSize_> >,
std::vector<std::shared_ptr<std::array<MemberType,chunkSize_> >,
SmartPointerAllocator> chunks_;
/** @brief The current data capacity.
* This is the capacity that the list could have theoretically
......
......@@ -15,10 +15,10 @@
#include <complex>
#include <algorithm>
#include <functional>
#include <memory>
#include <dune/common/exceptions.hh>
#include <dune/common/binaryfunctions.hh>
#include <dune/common/shared_ptr.hh>
#include "collectivecommunication.hh"
#include "mpitraits.hh"
......@@ -44,7 +44,7 @@ namespace Dune
{
if (!op)
{
op = shared_ptr<MPI_Op>(new MPI_Op);
op = std::shared_ptr<MPI_Op>(new MPI_Op);
MPI_Op_create((void (*)(void*, void*, int*, MPI_Datatype*))&operation,true,op.get());
}
return *op;
......@@ -62,12 +62,12 @@ namespace Dune
}
Generic_MPI_Op () {}
Generic_MPI_Op (const Generic_MPI_Op& ) {}
static shared_ptr<MPI_Op> op;
static std::shared_ptr<MPI_Op> op;
};
template<typename Type, typename BinaryFunction>
shared_ptr<MPI_Op> Generic_MPI_Op<Type,BinaryFunction>::op = shared_ptr<MPI_Op>(static_cast<MPI_Op*>(0));
std::shared_ptr<MPI_Op> Generic_MPI_Op<Type,BinaryFunction>::op = std::shared_ptr<MPI_Op>(static_cast<MPI_Op*>(0));
#define ComposeMPIOp(type,func,op) \
template<> \
......
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