Advanced Multi-Physics (AMP)
On-Line Documentation
Classes | Namespaces | Macros | Functions | Variables
to_tuple.h File Reference
#include "AMP/utils/MacroFunctions.h"
#include <tuple>
#include <type_traits>
Include dependency graph for to_tuple.h:

Go to the source code of this file.

Classes

struct  AMP::any_type
 
struct  AMP::is_braces_constructible< T, Args >
 

Namespaces

namespace  AMP
 

Macros

#define AMP_ANY(X)   any_type
 
#define AMP_COMMA()   ,
 
#define AMP_PRINT(X)   _##X
 
#define AMP_TO_TUPLE_BLOCK(N)   AMP_SEQ_D( N, AMP_TO_TUPLE_BLOCK2, AMP_NULL )
 
#define AMP_TO_TUPLE_BLOCK2(N)
 

Functions

template<class T , typename... Args>
std::false_type AMP::test (...)
 
template<class T , typename... Args>
decltype(void(T{ std::declval< Args >()... }), std::true_type()) AMP::test (int)
 
template<class T >
auto AMP::to_tuple (T &&object) noexcept
 

Variables

template<class T , typename... Args>
constexpr bool AMP::is_braces_constructible_v = is_braces_constructible<T, Args...>{}
 

Macro Definition Documentation

◆ AMP_ANY

#define AMP_ANY (   X)    any_type

Definition at line 34 of file to_tuple.h.

◆ AMP_COMMA

#define AMP_COMMA ( )    ,

Definition at line 33 of file to_tuple.h.

◆ AMP_PRINT

#define AMP_PRINT (   X)    _##X

Definition at line 32 of file to_tuple.h.

◆ AMP_TO_TUPLE_BLOCK

#define AMP_TO_TUPLE_BLOCK (   N)    AMP_SEQ_D( N, AMP_TO_TUPLE_BLOCK2, AMP_NULL )

Definition at line 40 of file to_tuple.h.

◆ AMP_TO_TUPLE_BLOCK2

#define AMP_TO_TUPLE_BLOCK2 (   N)
Value:
if constexpr ( is_braces_constructible_v<type, AMP_SEQ_U( N, AMP_ANY, AMP_COMMA )> ) { \
auto &&[AMP_SEQ_U( N, AMP_PRINT, AMP_COMMA )] = object; \
return std::make_tuple( AMP_SEQ_U( N, AMP_PRINT, AMP_COMMA ) ); \
} else
#define AMP_SEQ_U(N, F, S)
#define AMP_PRINT(X)
Definition to_tuple.h:32
#define AMP_ANY(X)
Definition to_tuple.h:34
#define AMP_COMMA()
Definition to_tuple.h:33

Definition at line 35 of file to_tuple.h.



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page