AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::inlet::detail::inlet_function_arg_type< Arg > Class Template Reference

A type trait for modifying function argument types to enforce const correctness and to avoid copies. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/inlet/Function.hpp>

Public Types

using type = typename std::conditional< std::is_arithmetic< Arg >::value, Arg, typename std::add_lvalue_reference< typename std::add_const< Arg >::type >::type >::type
 

Detailed Description

template<typename Arg>
class axom::inlet::detail::inlet_function_arg_type< Arg >

A type trait for modifying function argument types to enforce const correctness and to avoid copies.

Template Parameters
ArgThe argument type

Maps a type "Arg" to "const Arg&" if that type does not satisfy std::is_arithmetic, which matches Inlet primitive types bool, int, and double, but not vectors or std::strings - though only vectors and doubles are currently supported as arg types

Member Typedef Documentation

◆ type

template<typename Arg >
using axom::inlet::detail::inlet_function_arg_type< Arg >::type = typename std::conditional< std::is_arithmetic<Arg>::value, Arg, typename std::add_lvalue_reference<typename std::add_const<Arg>::type>::type>::type

The documentation for this class was generated from the following file: