Blaze 3.9
Functions
Algorithms

Functions

template<typename T , typename... Args>
void blaze::construct_at (T *p, Args &&... args)
 Constructs the object at the given address. More...
 
template<typename ForwardIt >
void blaze::destroy (ForwardIt first, ForwardIt last)
 Destroys the given range of objects . More...
 
template<typename ForwardIt >
void blaze::destroy_n (ForwardIt first, size_t n)
 Destroys the given range of objects . More...
 
template<typename T >
void blaze::destroy_at (T *p) noexcept
 Destroys the object at the given address. More...
 
template<typename T1 , typename T2 , typename R1 = RemoveCVRef_t<T1>, typename R2 = RemoveCVRef_t<T2>, EnableIf_t< HasLessThan_v< R1, R2 > &&!(IsSigned_v< R1 > &&IsUnsigned_v< R2 >) &&!(IsUnsigned_v< R1 > &&IsSigned_v< R2 >) > * = nullptr>
constexpr decltype(auto) blaze::max (T1 &&a, T2 &&b)
 Maximum function for two values/objects. More...
 
template<typename T1 , typename T2 , typename T3 >
constexpr decltype(auto) blaze::max (T1 &&a, T2 &&b, T3 &&c)
 Maximum function for three values/objects. More...
 
template<typename T1 , typename T2 , typename T3 , typename... Ts>
constexpr decltype(auto) blaze::max (T1 &&a, T2 &&b, T3 &&c, Ts &&... args)
 Maximum function for at least four values/objects. More...
 
template<typename T1 , typename T2 , typename R1 = RemoveCVRef_t<T1>, typename R2 = RemoveCVRef_t<T2>, EnableIf_t< HasLessThan_v< R2, R1 > &&!(IsSigned_v< R1 > &&IsUnsigned_v< R2 >) &&!(IsUnsigned_v< R1 > &&IsSigned_v< R2 >) > * = nullptr>
constexpr decltype(auto) blaze::min (T1 &&a, T2 &&b)
 Minimum function for two values/objects. More...
 
template<typename T1 , typename T2 , typename T3 >
constexpr decltype(auto) blaze::min (T1 &&a, T2 &&b, T3 &&c)
 Minimum function for three values/objects. More...
 
template<typename T1 , typename T2 , typename T3 , typename... Ts>
constexpr decltype(auto) blaze::min (T1 &&a, T2 &&b, T3 &&c, Ts &&... args)
 Minimum function for at least four values/objects. More...
 
template<typename T1 , typename T2 , typename R1 = RemoveCVRef_t<T1>, typename R2 = RemoveCVRef_t<T2>, EnableIf_t< HasLessThan_v< R2, R1 > &&!(IsSigned_v< T1 > &&IsUnsigned_v< T2 >) &&!(IsUnsigned_v< T1 > &&IsSigned_v< T2 >) > * = nullptr>
constexpr decltype(auto) blaze::minmax (T1 &&a, T2 &&b)
 Minmax function for two values/objects. More...
 
template<typename InputIterator , typename OutputIterator >
OutputIterator blaze::transfer (InputIterator first, InputIterator last, OutputIterator dest)
 Transfers the elements from the given source range to the destination range. More...
 
template<typename InputIterator , typename OutputIterator >
OutputIterator blaze::transfer_n (InputIterator first, size_t n, OutputIterator dest)
 Transfers the elements from the given source range to the destination range. More...
 
template<typename ForwardIt >
void blaze::uninitialized_default_construct (ForwardIt first, ForwardIt last)
 Default constructs elements in the given range. More...
 
template<typename ForwardIt >
void blaze::uninitialized_default_construct_n (ForwardIt first, size_t n)
 Default constructs elements in the given range. More...
 
template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_move (InputIt first, InputIt last, ForwardIt dest)
 Move the elements from the given source range to the uninitialized destination range. More...
 
template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_move_n (InputIt first, size_t n, ForwardIt dest)
 Move the elements from the given source range to the uninitialized destination range. More...
 
template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_transfer (InputIt first, InputIt last, ForwardIt dest)
 Transfers the elements from the given source range to the uninitialized destination range. More...
 
template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_transfer_n (InputIt first, size_t n, ForwardIt dest)
 Transfers the elements from the given source range to the uninitialized destination range. More...
 
template<typename ForwardIt >
void blaze::uninitialized_value_construct (ForwardIt first, ForwardIt last)
 Value constructs elements in the given range. More...
 
template<typename ForwardIt >
void blaze::uninitialized_value_construct_n (ForwardIt first, size_t n)
 Value constructs elements in the given range. More...
 

Detailed Description

Function Documentation

◆ construct_at()

template<typename T , typename... Args>
void blaze::construct_at ( T *  p,
Args &&...  args 
)

Constructs the object at the given address.

Parameters
pThe address of the object to be constructed.
argsThe constructor arguments for the object to be constructed.
Returns
void

This function constructs an object of type T at the given address.

◆ destroy()

template<typename ForwardIt >
void blaze::destroy ( ForwardIt  first,
ForwardIt  last 
)

Destroys the given range of objects .

Parameters
firstIterator to the first element to be destroyed.
lastIterator to the element one past the last element to be destroyed.
Returns
void

This function explicitly calls the destructor of all object in the given range.

◆ destroy_at()

template<typename T >
void blaze::destroy_at ( T *  p)
noexcept

Destroys the object at the given address.

Parameters
pThe address of the object to be destroyed.
Returns
void

This function explicitly calls the destructor of the object at the given address.

◆ destroy_n()

template<typename ForwardIt >
void blaze::destroy_n ( ForwardIt  first,
size_t  n 
)

Destroys the given range of objects .

Parameters
firstIterator to the first element to be destroyed.
nThe number of elements to be destroyed.
Returns
void

This function explicitly calls the destructor of all object in the given range.

◆ max() [1/3]

template<typename T1 , typename T2 , typename R1 = RemoveCVRef_t<T1>, typename R2 = RemoveCVRef_t<T2>, EnableIf_t< HasLessThan_v< R1, R2 > &&!(IsSigned_v< R1 > &&IsUnsigned_v< R2 >) &&!(IsUnsigned_v< R1 > &&IsSigned_v< R2 >) > * = nullptr>
constexpr decltype(auto) blaze::max ( T1 &&  a,
T2 &&  b 
)
constexpr

Maximum function for two values/objects.

Parameters
aThe first value/object.
bThe second value/object.
Returns
The maximum of the two values/objects.

This function determines the maximum of the two given values by means of a less-than comparison. The return type of the function is determined by the data types of the given arguments.

◆ max() [2/3]

template<typename T1 , typename T2 , typename T3 >
constexpr decltype(auto) blaze::max ( T1 &&  a,
T2 &&  b,
T3 &&  c 
)
constexpr

Maximum function for three values/objects.

Parameters
aThe first value/object.
bThe second value/object.
cThe third value/object.
Returns
The maximum of the given values/objects.

This function returns the maximum of the given values/objects. The return type of the function is determined by the data types of the given arguments.

◆ max() [3/3]

template<typename T1 , typename T2 , typename T3 , typename... Ts>
constexpr decltype(auto) blaze::max ( T1 &&  a,
T2 &&  b,
T3 &&  c,
Ts &&...  args 
)
constexpr

Maximum function for at least four values/objects.

Parameters
aThe first value/object.
bThe second value/object.
cThe third value/object.
argsThe pack of additional values/objects.
Returns
The maximum of the given values/objects.

This function returns the maximum of the given values/objects. The return type of the function is determined by the data types of the given arguments.

◆ min() [1/3]

template<typename T1 , typename T2 , typename R1 = RemoveCVRef_t<T1>, typename R2 = RemoveCVRef_t<T2>, EnableIf_t< HasLessThan_v< R2, R1 > &&!(IsSigned_v< R1 > &&IsUnsigned_v< R2 >) &&!(IsUnsigned_v< R1 > &&IsSigned_v< R2 >) > * = nullptr>
constexpr decltype(auto) blaze::min ( T1 &&  a,
T2 &&  b 
)
constexpr

Minimum function for two values/objects.

Parameters
aThe first value/object.
bThe second value/object.
Returns
The minimum of the two values/objects.

This function determines the minimum of the two given values by means of a less-than comparison. The return type of the function is determined by the data types of the given arguments.

◆ min() [2/3]

template<typename T1 , typename T2 , typename T3 >
constexpr decltype(auto) blaze::min ( T1 &&  a,
T2 &&  b,
T3 &&  c 
)
constexpr

Minimum function for three values/objects.

Parameters
aThe first value/object.
bThe second value/object.
cThe third value/object.
Returns
The minimum of the given values/objects.

This function returns the minimum of the given values/objects. The return type of the function is determined by the data types of the given arguments.

◆ min() [3/3]

template<typename T1 , typename T2 , typename T3 , typename... Ts>
constexpr decltype(auto) blaze::min ( T1 &&  a,
T2 &&  b,
T3 &&  c,
Ts &&...  args 
)
constexpr

Minimum function for at least four values/objects.

Parameters
aThe first value/object.
bThe second value/object.
cThe third value/object.
argsThe pack of additional values/objects.
Returns
The minimum of the given values/objects.

This function returns the minimum of the given values/objects. The return type of the function is determined by the data types of the given arguments.

◆ minmax()

template<typename T1 , typename T2 , typename R1 = RemoveCVRef_t<T1>, typename R2 = RemoveCVRef_t<T2>, EnableIf_t< HasLessThan_v< R2, R1 > &&!(IsSigned_v< T1 > &&IsUnsigned_v< T2 >) &&!(IsUnsigned_v< T1 > &&IsSigned_v< T2 >) > * = nullptr>
constexpr decltype(auto) blaze::minmax ( T1 &&  a,
T2 &&  b 
)
constexpr

Minmax function for two values/objects.

Parameters
aThe first value/object.
bThe second value/object.
Returns
A pair of the minimum and maximum of the two values/objects.

This function determines the minimum and maximium of the two given values/objects by means of a less-than comparison. The return type of the function is determined by the data types of the given arguments.

◆ transfer()

template<typename InputIterator , typename OutputIterator >
OutputIterator blaze::transfer ( InputIterator  first,
InputIterator  last,
OutputIterator  dest 
)

Transfers the elements from the given source range to the destination range.

Parameters
firstIterator to the first element of the source range.
lastIterator to the element one past the last element of the source range.
destIterator to the first element of the destination range.
Returns
Output iterator to the element one past the last copied element.

This function transfers the elements in the range $ [first,last) $ to the specified destination range. In case the elements provide a no-throw move assignment, the transfer operation is handled via move. Else the elements are copied.

◆ transfer_n()

template<typename InputIterator , typename OutputIterator >
OutputIterator blaze::transfer_n ( InputIterator  first,
size_t  n,
OutputIterator  dest 
)

Transfers the elements from the given source range to the destination range.

Parameters
firstIterator to the first element of the source range.
nThe number of elements to be moved.
destIterator to the first element of the destination range.
Returns
Output iterator to the element one past the last copied element.

This function transfers the elements in the range $ [first,first+n) $ to the specified destination range. In case the elements provide a no-throw move assignment, the transfer operation is handled via move. Else the elements are copied.

◆ uninitialized_default_construct()

template<typename ForwardIt >
void blaze::uninitialized_default_construct ( ForwardIt  first,
ForwardIt  last 
)

Default constructs elements in the given range.

Parameters
firstIterator to the first element of the range.
lastIterator to the element one past the last element of the range.
Returns
void

This function default constructs elements in the given range $ [first,last) $. The range is assumed to be uninitialized.

◆ uninitialized_default_construct_n()

template<typename ForwardIt >
void blaze::uninitialized_default_construct_n ( ForwardIt  first,
size_t  n 
)

Default constructs elements in the given range.

Parameters
firstIterator to the first element of the range.
nThe number of elements to be constructed.
Returns
void

This function default constructs elements in the given range $ [first,first+n) $. The range is assumed to be uninitialized.

◆ uninitialized_move()

template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_move ( InputIt  first,
InputIt  last,
ForwardIt  dest 
)

Move the elements from the given source range to the uninitialized destination range.

Parameters
firstIterator to the first element of the source range.
lastIterator to the element one past the last element of the source range.
destIterator to the first element of the destination range.
Returns
Output iterator to the element one past the last copied element.

This function moves the elements from the source range $ [first,last) $ to the specified destination range. The destination range is assumed to be uninitialized, i.e. the elements are move constructed.

◆ uninitialized_move_n()

template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_move_n ( InputIt  first,
size_t  n,
ForwardIt  dest 
)

Move the elements from the given source range to the uninitialized destination range.

Parameters
firstIterator to the first element of the source range.
nThe number of elements to be moved.
destIterator to the first element of the destination range.
Returns
Output iterator to the element one past the last copied element.

This function moves the elements from the source range $ [first,first+n) $ to the specified destination range. The destination range is assumed to be uninitialized, i.e. the elements are move constructed.

◆ uninitialized_transfer()

template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_transfer ( InputIt  first,
InputIt  last,
ForwardIt  dest 
)

Transfers the elements from the given source range to the uninitialized destination range.

Parameters
firstIterator to the first element of the source range.
lastIterator to the element one past the last element of the source range.
destIterator to the first element of the destination range.
Returns
Output iterator to the element one past the last copied element.

This function transfers the elements in the range $ [first,last) $ to the specified destination range. The destination range is assumed to be uninitialized. In case the elements provide a no-throw move assignment operator, the transfer operation is handled via move construction, else the elements are copied constructed.

◆ uninitialized_transfer_n()

template<typename InputIt , typename ForwardIt >
ForwardIt blaze::uninitialized_transfer_n ( InputIt  first,
size_t  n,
ForwardIt  dest 
)

Transfers the elements from the given source range to the uninitialized destination range.

Parameters
firstIterator to the first element of the source range.
nThe number of elements to be moved.
destIterator to the first element of the destination range.
Returns
Output iterator to the element one past the last copied element.

This function transfers the elements in the range $ [first,first+n) $ to the specified destination range. The destination range is assumed to be uninitialized. In case the elements provide a no-throw move assignment operator, the transfer operation is handled via move construction, else the elements are copied constructed.

◆ uninitialized_value_construct()

template<typename ForwardIt >
void blaze::uninitialized_value_construct ( ForwardIt  first,
ForwardIt  last 
)

Value constructs elements in the given range.

Parameters
firstIterator to the first element of the range.
lastIterator to the element one past the last element of the range.
Returns
void

This function value constructs elements in the given range $ [first,last) $. The range is assumed to be uninitialized.

◆ uninitialized_value_construct_n()

template<typename ForwardIt >
void blaze::uninitialized_value_construct_n ( ForwardIt  first,
size_t  n 
)

Value constructs elements in the given range.

Parameters
firstIterator to the first element of the range.
nThe number of elements to be constructed.
Returns
void

This function value constructs elements in the given range $ [first,first+n) $. The range is assumed to be uninitialized.