BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslalg_scalarprimitives

Typedefs

typedef bslalg::ScalarPrimitives bslalg_ScalarPrimitives
 This alias is defined for backward compatibility.
 

Detailed Description

Outline

Purpose

Provide primitive algorithms that operate on single elements.

Classes

See also
bslalg_constructorproxy

Description

This component provides primitive algorithms that operate on single elements with a uniform interface but select a different implementation according to the various type traits possessed by the underlying type. Such primitives are exceptionally useful for implementing generic components such as containers. There are six families of algorithms, each with a collection of overloads:

Algorithm Forwards to (depending on traits)
---------------- ------------------------------------------------
defaultConstruct Default constructor, with or without allocator
copyConstruct Copy constructor, with or without allocator,
or bitwise copy if appropriate
moveConstruct Move constructor, with or without allocator,
or bitwise copy if appropriate. In C++03 mode,
behavior is the same as 'copyConstruct'.
destructiveMove Move construction followed by destruction of the
original, with or without allocator,
or bitwise copy if appropriate
construct In-place construction (using variadic template
arguments, simulated by overloads), with
or without allocator
swap Three way assignment, or bitwise swap

The traits under consideration by this component are:

Trait Description
-------------------------------------------- -----------------------------
bsl::is_trivially_default_constructible "TYPE has the trivial default
constructor trait", or
"TYPE has a trivial default
constructor"
bslmf::IsBitwiseCopyable "TYPE has the bit-wise
copyable trait", or
"TYPE is bit-wise copyable"
(implies that it has a
trivial destructor too)
bslmf::IsBitwiseMoveable "TYPE has the bit-wise
moveable trait", or
"TYPE is bit-wise moveable"
bslma::UsesBslmaAllocator "the 'TYPE' constructor takes
an allocator argument", or
"'TYPE' supports 'bslma'
allocators"
bslmf::UsesAllocatorArgT "the 'TYPE' constructor takes
an allocator argument", and
optionally passes allocators
as the first two arguments to
each constructor, where the
tag type 'allocator_arg_t' is
first, and the allocator type
is second.
Definition bslmf_istriviallydefaultconstructible.h:293
Definition bslma_usesbslmaallocator.h:343
Definition bslmf_isbitwisecopyable.h:298
Definition bslmf_isbitwisemoveable.h:718
Definition bslmf_usesallocatorargt.h:100

Usage

This component is for use primarily by the bslstl package. Other clients should use the STL algorithms provided in <algorithm> and <memory>.

Typedef Documentation

◆ bslalg_ScalarPrimitives