CBMC
small_shared_n_way_ptr.h File Reference
#include <limits>
#include <tuple>
#include <type_traits>
#include <utility>
#include "invariant.h"
+ Include dependency graph for small_shared_n_way_ptr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  get_typet< I, Ts >
 Get the type with the given index in the parameter pack. More...
 
struct  destructt< I, pointee_baset, Ts >
 
struct  destructt< 0, pointee_baset, Ts... >
 
class  small_shared_n_way_ptrt< Ts >
 This class is similar to small_shared_ptrt and boost's intrusive_ptr. More...
 
class  small_shared_n_way_pointee_baset< N, Num >
 

Functions

template<std::size_t I, typename U , typename V , typename... Ts>
small_shared_n_way_ptrt< U, V > make_shared_2 (Ts &&... ts)
 Constructs a small shared n-way pointer, with two possible pointee types (i.e., n = 2), and constructs an object of either type U (when I = 0) or type V (when I = 1) pointed to by the shared pointer. More...
 
template<std::size_t I, typename U , typename V , typename W , typename... Ts>
small_shared_n_way_ptrt< U, V, W > make_shared_3 (Ts &&... ts)
 Constructs a small shared n-way pointer, with three possible pointee types (i.e., n = 3), and constructs an object of either type U (when I = 0), type V (when I = 1), or type W (when I = 2), pointed to by the shared pointer. More...
 
template<typename... Ts>
bool operator== (const small_shared_n_way_ptrt< Ts... > &lhs, const small_shared_n_way_ptrt< Ts... > &rhs)
 
template<typename... Ts>
bool operator!= (const small_shared_n_way_ptrt< Ts... > &lhs, const small_shared_n_way_ptrt< Ts... > &rhs)
 

Function Documentation

◆ make_shared_2()

template<std::size_t I, typename U , typename V , typename... Ts>
small_shared_n_way_ptrt<U, V> make_shared_2 ( Ts &&...  ts)

Constructs a small shared n-way pointer, with two possible pointee types (i.e., n = 2), and constructs an object of either type U (when I = 0) or type V (when I = 1) pointed to by the shared pointer.

Arguments ts are passed to the constructor of U or V. U and V must be subclasses of small_shared_n_way_pointee_baset<2, Num>.

Template Parameters
Iindex of the type of object to construct (0 -> U, 1 -> V)
Ufirst possible pointee type
Vsecond possible pointee type
Tstypes of arguments to pass to the constructor of U or V
Parameters
tsarguments to pass to the constructor of U or V

Definition at line 272 of file small_shared_n_way_ptr.h.

◆ make_shared_3()

template<std::size_t I, typename U , typename V , typename W , typename... Ts>
small_shared_n_way_ptrt<U, V, W> make_shared_3 ( Ts &&...  ts)

Constructs a small shared n-way pointer, with three possible pointee types (i.e., n = 3), and constructs an object of either type U (when I = 0), type V (when I = 1), or type W (when I = 2), pointed to by the shared pointer.

Arguments ts are passed to the constructor of U, V, or W. U, V, and W must be subclasses of small_shared_n_way_pointee_baset<3, Num>.

Template Parameters
Iindex of the type of object to construct (0 -> U, 1 -> V)
Ufirst possible pointee type
Vsecond possible pointee type
Wthird possible pointee type
Tstypes of arguments to pass to the constructor of U or V
Parameters
tsarguments to pass to the constructor of U or V

Definition at line 291 of file small_shared_n_way_ptr.h.

◆ operator!=()

template<typename... Ts>
bool operator!= ( const small_shared_n_way_ptrt< Ts... > &  lhs,
const small_shared_n_way_ptrt< Ts... > &  rhs 
)

Definition at line 307 of file small_shared_n_way_ptr.h.

◆ operator==()

template<typename... Ts>
bool operator== ( const small_shared_n_way_ptrt< Ts... > &  lhs,
const small_shared_n_way_ptrt< Ts... > &  rhs 
)

Definition at line 299 of file small_shared_n_way_ptr.h.