Main MRPT website > C++ reference for MRPT 1.9.9
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 31 of file copy_container_typecasting.h.

Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate().

mrpt::containers::copy_container_typecasting
void 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 approp...
Definition: copy_container_typecasting.h:31
v1
GLfloat GLfloat v1
Definition: glext.h:4105



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST