alpaqa no-casadi-dep
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
any_ptr Class Reference

#include <alpaqa/params/structs.hpp>

Detailed Description

Like std::any, but storing just the pointer, without any dynamic allocation.

Definition at line 17 of file structs.hpp.

+ Collaboration diagram for any_ptr:

Public Member Functions

 any_ptr ()=default
 
template<class T >
 any_ptr (T *ptr)
 
template<class T >
Tcast () const
 

Private Attributes

voidptr = nullptr
 
const std::type_info * ptr_type = nullptr
 
bool is_const = true
 

Constructor & Destructor Documentation

◆ any_ptr() [1/2]

any_ptr ( )
default

◆ any_ptr() [2/2]

template<class T >
any_ptr ( T ptr)
inline

Definition at line 21 of file structs.hpp.

Member Function Documentation

◆ cast()

template<class T >
T * cast ( ) const
inline

Definition at line 26 of file structs.hpp.

Member Data Documentation

◆ ptr

void* ptr = nullptr
private

Definition at line 37 of file structs.hpp.

◆ ptr_type

const std::type_info* ptr_type = nullptr
private

Definition at line 38 of file structs.hpp.

◆ is_const

bool is_const = true
private

Definition at line 39 of file structs.hpp.


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