3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 06:14:14 +01:00

add get_component

This commit is contained in:
Olivier Parcollet 2013-07-22 13:40:07 +02:00
parent 3bf00059a4
commit 43078dc597

View File

@ -165,6 +165,9 @@ namespace triqs { namespace gf {
template<int pos, typename P> template<int pos, typename P>
auto get_point(P const & p) DECL_AND_RETURN( std::get<pos>( p.mesh()->components() ).index_to_point( std::get<pos>(p.components_tuple()).index() ) ); auto get_point(P const & p) DECL_AND_RETURN( std::get<pos>( p.mesh()->components() ).index_to_point( std::get<pos>(p.components_tuple()).index() ) );
template<int pos, typename P>
auto get_component(P const & p) DECL_AND_RETURN( std::get<pos>(p.components_tuple()));
// C++14 // C++14
//auto get_point(P const & p) { return std::get<pos> (p.mesh()->components()).index_to_point( std::get<pos>(p.components_tuple()));} //auto get_point(P const & p) { return std::get<pos> (p.mesh()->components()).index_to_point( std::get<pos>(p.components_tuple()));}