MorphoGraphX
Classes | Namespaces | Functions
Tie.hpp File Reference

Defines the util::tie function. More...

#include <Config.hpp>
#include <utility>

Go to the source code of this file.

Classes

class  mgx::util::refpair< T, U >
 Class used to hold references for the util::tie() function. More...
 

Namespaces

 mgx
 This namespace contains all the API of MorphoGraphX.
 

Functions

template<typename T , typename U >
refpair< T, U > mgx::util::tie (T &x, U &y)
 Tie two variables to the values of a pair. More...
 

Detailed Description

Defines the util::tie function.

Function Documentation

template<typename T , typename U >
refpair<T, U> mgx::util::tie ( T &  x,
U &  y 
)
inline

Tie two variables to the values of a pair.

Example:

std::pair<int,double> p(1,2.5);
int a;
double b;
util::tie(a,b) = p;

At the end, a is 1 and b is 2.5