MRPT  2.0.2
Functions
Containers_grp

Detailed Description

Functions

template<typename src_container , typename dst_container >
void mrpt::containers::copy_container_typecasting (const src_container &src, dst_container &trg)
 Copy all the elements in a container (vector, deque, list) into a different one performing the appropriate typecasting. More...
 

Function Documentation

◆ copy_container_typecasting()

template<typename src_container , typename dst_container >
void mrpt::containers::copy_container_typecasting ( const src_container &  src,
dst_container &  trg 
)
inline

Copy all the elements in a container (vector, deque, list) into a different one performing the appropriate typecasting.

The target container is automatically resized to the appropriate size, and previous contents are lost. This can be used to assign std::vector's of different types:

std::vector<int> vi(10);
std::vector<float> vf;
vf = vi; // Compiler error

Definition at line 29 of file copy_container_typecasting.h.

Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), and TEST().

Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 2.0.2 Git: 9b4fd2465 Mon May 4 16:59:08 2020 +0200 at lun may 4 17:26:07 CEST 2020