proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
xyz::polymorphic< T, A > Class Template Reference

#include <proxsuite-nlp/third-party/polymorphic_cxx14.hpp>

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 160 of file polymorphic_cxx14.hpp.

Member Typedef Documentation

◆ value_type

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

Definition at line 185 of file polymorphic_cxx14.hpp.

◆ allocator_type

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

Definition at line 186 of file polymorphic_cxx14.hpp.

◆ pointer

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

Definition at line 187 of file polymorphic_cxx14.hpp.

◆ 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 188 of file polymorphic_cxx14.hpp.

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 193 of file polymorphic_cxx14.hpp.

◆ 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 203 of file polymorphic_cxx14.hpp.

◆ 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 214 of file polymorphic_cxx14.hpp.

◆ 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 228 of file polymorphic_cxx14.hpp.

◆ 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 245 of file polymorphic_cxx14.hpp.

◆ 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 260 of file polymorphic_cxx14.hpp.

◆ 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 280 of file polymorphic_cxx14.hpp.

◆ 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 302 of file polymorphic_cxx14.hpp.

◆ 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 308 of file polymorphic_cxx14.hpp.

◆ 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 317 of file polymorphic_cxx14.hpp.

◆ 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 323 of file polymorphic_cxx14.hpp.

◆ polymorphic() [12/12]

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

Definition at line 344 of file polymorphic_cxx14.hpp.

◆ ~polymorphic()

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

Definition at line 348 of file polymorphic_cxx14.hpp.

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 350 of file polymorphic_cxx14.hpp.

◆ 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 375 of file polymorphic_cxx14.hpp.

◆ operator->() [1/2]

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

Definition at line 408 of file polymorphic_cxx14.hpp.

◆ operator->() [2/2]

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

Definition at line 413 of file polymorphic_cxx14.hpp.

◆ operator*() [1/2]

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

Definition at line 418 of file polymorphic_cxx14.hpp.

◆ operator*() [2/2]

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

Definition at line 423 of file polymorphic_cxx14.hpp.

◆ valueless_after_move()

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

Definition at line 428 of file polymorphic_cxx14.hpp.

◆ get_allocator()

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

Definition at line 432 of file polymorphic_cxx14.hpp.

◆ swap()

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

Definition at line 434 of file polymorphic_cxx14.hpp.

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 451 of file polymorphic_cxx14.hpp.


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