FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
std Namespace Reference

Similar to standard C++ std namespace, this namespace is used by FastArduino library to implement various types of the standard C++ library when this is useful. More...

Classes

class  initializer_list
 C++ standard support for "initializer_list". More...
 

Functions

template<typename T >
constexpr types_traits::remove_reference< T >::type && move (T &&t)
 Obtain an "rvalue" reference. More...
 

Detailed Description

Similar to standard C++ std namespace, this namespace is used by FastArduino library to implement various types of the standard C++ library when this is useful.

For these standard types, FastArduino strives to keep the original API as much as possible, but be aware that FastArduino API may not have 100% fidelity to C++ standard API.

Function Documentation

◆ move()

template<typename T >
constexpr types_traits::remove_reference< T >::type && std::move ( T &&  t)
constexpr

Obtain an "rvalue" reference.

This function is used to indicate that the object t can be "moved from"; this will enforce usage of move-constructor or move-assignment operator of the lvalue in the code snipept below:

T right = ...;
T left = std::move(right);
...
right = std::move(left);
constexpr types_traits::remove_reference< T >::type && move(T &&t)
Obtain an "rvalue" reference.
Definition: move.h:40

In that snippet resources initially held by right variable are first transferred to left variable through T move-constructor; then resources held by left are transferred back to right variable through T move-assignment operator.

Definition at line 40 of file move.h.