forb
Public Types | Static Public Member Functions | List of all members
forbcc::shareable< T > Class Template Reference

A template that can be used to ease the declaration of a shared_pointer of a given type. More...

#include <shareable.hpp>

Public Types

using const_T = typename std::add_const< T >::type
 Alias to the same type T, but with const qualifier.
 
using ptr_t = std::shared_ptr< T >
 Alias to std::shared_ptr<T>
 
using ptr_const_t = std::shared_ptr< const_T >
 Alias to std::shared_ptr<const T>
 

Static Public Member Functions

template<typename ... Args>
static ptr_t new_ptr (Args &&... args)
 Calls the constructor of the class with the given arguments to create a shared_pointer to T. More...
 
template<typename ... Args>
static ptr_const_t new_ptr_const (Args &&... args)
 Calls the constructor of the class with the given arguments to create a shared_pointer to a const T. More...
 

Detailed Description

template<typename T>
class forbcc::shareable< T >

A template that can be used to ease the declaration of a shared_pointer of a given type.

Member Function Documentation

§ new_ptr()

template<typename T>
template<typename ... Args>
static ptr_t forbcc::shareable< T >::new_ptr ( Args &&...  args)
inlinestatic

Calls the constructor of the class with the given arguments to create a shared_pointer to T.

Alias of std::make_shared<T>.

§ new_ptr_const()

template<typename T>
template<typename ... Args>
static ptr_const_t forbcc::shareable< T >::new_ptr_const ( Args &&...  args)
inlinestatic

Calls the constructor of the class with the given arguments to create a shared_pointer to a const T.

Alias of std::make_shared<const_T>.


The documentation for this class was generated from the following file: