CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
cloneable_ptr.hh File Reference
#include <memory>
#include <iostream>
#include "casm/misc/CASM_TMP.hh"

Go to the source code of this file.

Classes

class  notstd::Cloneable
 
class  notstd::cloneable_ptr< Type >
 A 'cloneable_ptr' can be used in place of 'unique_ptr'. More...
 
struct  notstd::has_clone< T, typename >
 Base type inherits from std::false_type if T does not have clone method. More...
 
struct  notstd::has_clone< T, CASM::CASM_TMP::void_t< decltype(std::declval< T & >().clone())> >
 Specialized case inherits from std::true_type if T does have clone method. More...
 
class  notstd::cloneable_ptr< Type >
 A 'cloneable_ptr' can be used in place of 'unique_ptr'. More...
 

Namespaces

 notstd
 Non-std smart pointer classes and functions.
 

Functions

template<typename T , typename... Args>
std::unique_ptr< T > notstd::make_unique (Args &&...args)
 c++11 does not include 'make_unique' More...
 
template<typename T , typename... Args>
cloneable_ptr< T > notstd::make_cloneable (Args &&...args)
 make a cloneable_ptr<T> via T(Args... args) More...
 
template<typename T >
std::unique_ptr< T > notstd::clone (const T &obj, typename std::enable_if< has_clone< T >::value, T >::type *=nullptr)
 
template<typename T >
std::unique_ptr< T > notstd::clone (const T &obj, typename std::enable_if< !has_clone< T >::value, T >::type *=nullptr)
 
template<typename Type >
void notstd::swap (cloneable_ptr< Type > &A, cloneable_ptr< Type > &B)
 
template<typename Type >
bool notstd::operator< (const cloneable_ptr< Type > &A, const cloneable_ptr< Type > &B)
 
template<typename Type >
bool notstd::operator== (const cloneable_ptr< Type > &A, const cloneable_ptr< Type > &B)
 
template<typename Type >
bool notstd::operator!= (const cloneable_ptr< Type > &A, const cloneable_ptr< Type > &B)