Skip to content

Commit

Permalink
Fix compilation errors with C++20 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Jan 15, 2024
1 parent 8e331af commit 2d0f291
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/TypesafeCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class TypesafeCollection
}

virtual ~TypesafeCollection(){}
TypesafeCollection<T>(const TypesafeCollection<T>&) = delete;
TypesafeCollection<T>& operator=(const TypesafeCollection<T>&) = delete;
TypesafeCollection(const TypesafeCollection<T>&) = delete;
TypesafeCollection& operator=(const TypesafeCollection<T>&) = delete;

bool is_valid()
{
Expand Down
8 changes: 4 additions & 4 deletions vertex_lcfi/util/inc/memorymanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ namespace vertex_lcfi
//Protect the constructor, copy and assignment to prevent usage.
protected:
//! Do not use
MemoryManager<T>() {}
MemoryManager() = default;
//! Do not use
MemoryManager<T>(const MemoryManager<T>&) {}
MemoryManager(const MemoryManager<T>&) = delete;
//! Do not use
MemoryManager<T>& operator= (const MemoryManager<T>&) {return MemoryManager<T>();}
MemoryManager<T>& operator= (const MemoryManager<T>&) = delete;
private:
std::vector<T*> _Objects{};

};

template <class T>
MemoryManager<T>::~MemoryManager<T>()
MemoryManager<T>::~MemoryManager()
{
//Delete all in case the user hasn't done so
this->delAll();
Expand Down
4 changes: 2 additions & 2 deletions vertex_lcfi/zvtop/include/maxminfinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace ZVTOP
FunctionMinimiser( T* funcClass, double initialDelta, unsigned int decimalPlaces );
~FunctionMinimiser(){};//I doubt this will be derived from but stick it in anyway
std::vector<double> Minimise( const std::vector<double> & seedPoint );
FunctionMinimiser<T>(const FunctionMinimiser<T>&) = delete;
FunctionMinimiser<T>& operator=(const FunctionMinimiser<T>&) = delete;
FunctionMinimiser(const FunctionMinimiser<T>&) = delete;
FunctionMinimiser& operator=(const FunctionMinimiser<T>&) = delete;
protected:
//Method that finds a vector that 'points down hill' by examining the rate of
//change of the function at the point "point".
Expand Down

0 comments on commit 2d0f291

Please sign in to comment.