aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
 
Loading...
Searching...
No Matches
xyz::polymorphic< T, A > Class Template Reference

#include <aligator/third-party/polymorphic_cxx14.h>

Inheritance diagram for xyz::polymorphic< T, A >:
[legend]
Collaboration diagram for xyz::polymorphic< T, A >:
[legend]

Public Types

using value_type = T
 
using allocator_type = A
 
using pointer = typename allocator_traits::pointer
 
using const_pointer = typename allocator_traits::const_pointer
 

Public Member Functions

template<typename TT = T, typename std::enable_if< std::is_default_constructible< TT >::value, int >::type = 0>
 polymorphic (std::allocator_arg_t, const A &alloc)
 
template<typename TT = T, typename std::enable_if< std::is_default_constructible< TT >::value, int >::type = 0, typename AA = A, typename std::enable_if< std::is_default_constructible< AA >::value, int >::type = 0>
 polymorphic ()
 
template<class U, class... Ts, typename std::enable_if< std::is_constructible< U, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0>
 polymorphic (std::allocator_arg_t, const A &alloc, in_place_type_t< U >, Ts &&... ts)
 
template<class U, class I, class... Ts, typename std::enable_if< std::is_constructible< U, std::initializer_list< I >, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0>
 polymorphic (std::allocator_arg_t, const A &alloc, in_place_type_t< U >, std::initializer_list< I > ilist, Ts &&... ts)
 
template<class U, class I, class... Ts, typename std::enable_if< std::is_constructible< U, std::initializer_list< I >, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0, typename AA = A, typename std::enable_if< std::is_default_constructible< AA >::value, int >::type = 0>
 polymorphic (in_place_type_t< U >, std::initializer_list< I > ilist, Ts &&... ts)
 
template<class U, class... Ts, typename std::enable_if< std::is_constructible< U, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0, typename AA = A, typename std::enable_if< std::is_default_constructible< AA >::value, int >::type = 0>
 polymorphic (in_place_type_t< U >, Ts &&... ts)
 
template<class U, typename std::enable_if< !std::is_same< polymorphic, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0>
 polymorphic (std::allocator_arg_t, const A &alloc, U &&u)
 
template<class U, typename std::enable_if< !std::is_same< polymorphic, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0>
 polymorphic (U &&u)
 
 polymorphic (std::allocator_arg_t, const A &alloc, const polymorphic &other)
 
 polymorphic (const polymorphic &other)
 
 polymorphic (std::allocator_arg_t, const A &alloc, polymorphic &&other) noexcept(allocator_traits::is_always_equal::value)
 
 polymorphic (polymorphic &&other) noexcept
 
 ~polymorphic ()
 
constexpr polymorphicoperator= (const polymorphic &other)
 
constexpr polymorphicoperator= (polymorphic &&other) noexcept(allocator_traits::propagate_on_container_move_assignment::value||allocator_traits::is_always_equal::value)
 
pointer operator-> () noexcept
 
const_pointer operator-> () const noexcept
 
T & operator* () noexcept
 
const T & operator* () const noexcept
 
bool valueless_after_move () const noexcept
 
allocator_type get_allocator () const noexcept
 
void swap (polymorphic &other) noexcept(std::allocator_traits< A >::propagate_on_container_swap::value||std::allocator_traits< A >::is_always_equal::value)
 

Friends

void swap (polymorphic &lhs, polymorphic &rhs) noexcept(noexcept(lhs.swap(rhs)))
 

Detailed Description

template<class T, class A = std::allocator<T>>
class xyz::polymorphic< T, A >

Definition at line 106 of file polymorphic_cxx14.h.

Member Typedef Documentation

◆ value_type

template<class T, class A = std::allocator<T>>
using xyz::polymorphic< T, A >::value_type = T

Definition at line 194 of file polymorphic_cxx14.h.

◆ allocator_type

template<class T, class A = std::allocator<T>>
using xyz::polymorphic< T, A >::allocator_type = A

Definition at line 195 of file polymorphic_cxx14.h.

◆ pointer

template<class T, class A = std::allocator<T>>
using xyz::polymorphic< T, A >::pointer = typename allocator_traits::pointer

Definition at line 196 of file polymorphic_cxx14.h.

◆ const_pointer

template<class T, class A = std::allocator<T>>
using xyz::polymorphic< T, A >::const_pointer = typename allocator_traits::const_pointer

Definition at line 197 of file polymorphic_cxx14.h.

Constructor & Destructor Documentation

◆ polymorphic() [1/12]

template<class T, class A = std::allocator<T>>
template<typename TT = T, typename std::enable_if< std::is_default_constructible< TT >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( std::allocator_arg_t ,
const A & alloc )
inline

Definition at line 202 of file polymorphic_cxx14.h.

◆ polymorphic() [2/12]

template<class T, class A = std::allocator<T>>
template<typename TT = T, typename std::enable_if< std::is_default_constructible< TT >::value, int >::type = 0, typename AA = A, typename std::enable_if< std::is_default_constructible< AA >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( )
inline

Definition at line 212 of file polymorphic_cxx14.h.

◆ polymorphic() [3/12]

template<class T, class A = std::allocator<T>>
template<class U, class... Ts, typename std::enable_if< std::is_constructible< U, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( std::allocator_arg_t ,
const A & alloc,
in_place_type_t< U > ,
Ts &&... ts )
inline

Definition at line 223 of file polymorphic_cxx14.h.

◆ polymorphic() [4/12]

template<class T, class A = std::allocator<T>>
template<class U, class I, class... Ts, typename std::enable_if< std::is_constructible< U, std::initializer_list< I >, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( std::allocator_arg_t ,
const A & alloc,
in_place_type_t< U > ,
std::initializer_list< I > ilist,
Ts &&... ts )
inline

Definition at line 237 of file polymorphic_cxx14.h.

◆ polymorphic() [5/12]

template<class T, class A = std::allocator<T>>
template<class U, class I, class... Ts, typename std::enable_if< std::is_constructible< U, std::initializer_list< I >, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0, typename AA = A, typename std::enable_if< std::is_default_constructible< AA >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( in_place_type_t< U > ,
std::initializer_list< I > ilist,
Ts &&... ts )
inlineexplicit

Definition at line 254 of file polymorphic_cxx14.h.

◆ polymorphic() [6/12]

template<class T, class A = std::allocator<T>>
template<class U, class... Ts, typename std::enable_if< std::is_constructible< U, Ts &&... >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< U >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, U >::value, int >::type = 0, typename AA = A, typename std::enable_if< std::is_default_constructible< AA >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( in_place_type_t< U > ,
Ts &&... ts )
inlineexplicit

Definition at line 269 of file polymorphic_cxx14.h.

◆ polymorphic() [7/12]

template<class T, class A = std::allocator<T>>
template<class U, typename std::enable_if< !std::is_same< polymorphic, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( std::allocator_arg_t ,
const A & alloc,
U && u )
inlineexplicit

Definition at line 289 of file polymorphic_cxx14.h.

◆ polymorphic() [8/12]

template<class T, class A = std::allocator<T>>
template<class U, typename std::enable_if< !std::is_same< polymorphic, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_copy_constructible< typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0, typename std::enable_if< std::is_base_of< T, typename std::remove_cv< typename std::remove_reference< U >::type >::type >::value, int >::type = 0>
xyz::polymorphic< T, A >::polymorphic ( U && u)
inline

Definition at line 311 of file polymorphic_cxx14.h.

◆ polymorphic() [9/12]

template<class T, class A = std::allocator<T>>
xyz::polymorphic< T, A >::polymorphic ( std::allocator_arg_t ,
const A & alloc,
const polymorphic< T, A > & other )
inline

Definition at line 317 of file polymorphic_cxx14.h.

◆ polymorphic() [10/12]

template<class T, class A = std::allocator<T>>
xyz::polymorphic< T, A >::polymorphic ( const polymorphic< T, A > & other)
inline

Definition at line 326 of file polymorphic_cxx14.h.

◆ polymorphic() [11/12]

template<class T, class A = std::allocator<T>>
xyz::polymorphic< T, A >::polymorphic ( std::allocator_arg_t ,
const A & alloc,
polymorphic< T, A > && other )
inlinenoexcept

Definition at line 332 of file polymorphic_cxx14.h.

◆ polymorphic() [12/12]

template<class T, class A = std::allocator<T>>
xyz::polymorphic< T, A >::polymorphic ( polymorphic< T, A > && other)
inlinenoexcept

Definition at line 353 of file polymorphic_cxx14.h.

◆ ~polymorphic()

template<class T, class A = std::allocator<T>>
xyz::polymorphic< T, A >::~polymorphic ( )
inline

Definition at line 357 of file polymorphic_cxx14.h.

Member Function Documentation

◆ operator=() [1/2]

template<class T, class A = std::allocator<T>>
polymorphic & xyz::polymorphic< T, A >::operator= ( const polymorphic< T, A > & other)
inlineconstexpr

Definition at line 359 of file polymorphic_cxx14.h.

◆ operator=() [2/2]

template<class T, class A = std::allocator<T>>
polymorphic & xyz::polymorphic< T, A >::operator= ( polymorphic< T, A > && other)
inlineconstexprnoexcept

Definition at line 384 of file polymorphic_cxx14.h.

◆ operator->() [1/2]

template<class T, class A = std::allocator<T>>
pointer xyz::polymorphic< T, A >::operator-> ( )
inlinenodiscardnoexcept

Definition at line 417 of file polymorphic_cxx14.h.

◆ operator->() [2/2]

template<class T, class A = std::allocator<T>>
const_pointer xyz::polymorphic< T, A >::operator-> ( ) const
inlinenodiscardnoexcept

Definition at line 422 of file polymorphic_cxx14.h.

◆ operator*() [1/2]

template<class T, class A = std::allocator<T>>
T & xyz::polymorphic< T, A >::operator* ( )
inlinenodiscardnoexcept

Definition at line 427 of file polymorphic_cxx14.h.

◆ operator*() [2/2]

template<class T, class A = std::allocator<T>>
const T & xyz::polymorphic< T, A >::operator* ( ) const
inlinenodiscardnoexcept

Definition at line 432 of file polymorphic_cxx14.h.

◆ valueless_after_move()

template<class T, class A = std::allocator<T>>
bool xyz::polymorphic< T, A >::valueless_after_move ( ) const
inlinenodiscardnoexcept

Definition at line 437 of file polymorphic_cxx14.h.

◆ get_allocator()

template<class T, class A = std::allocator<T>>
allocator_type xyz::polymorphic< T, A >::get_allocator ( ) const
inlinenoexcept

Definition at line 441 of file polymorphic_cxx14.h.

◆ swap()

template<class T, class A = std::allocator<T>>
void xyz::polymorphic< T, A >::swap ( polymorphic< T, A > & other)
inlinenoexcept

Definition at line 443 of file polymorphic_cxx14.h.

Friends And Related Symbol Documentation

◆ swap

template<class T, class A = std::allocator<T>>
void swap ( polymorphic< T, A > & lhs,
polymorphic< T, A > & rhs )
friend

Definition at line 460 of file polymorphic_cxx14.h.


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