GEOSX
Static Public Member Functions | List of all members
LvArray::indexing::ConditionalMultiply< true > Struct Template Reference

A specialization of ConditionalMultiply that skips the multiplication. More...

#include <indexing.hpp>

Static Public Member Functions

template<typename A , typename B >
static constexpr A multiply (A const a, B const &)
 

Detailed Description

template<>
struct LvArray::indexing::ConditionalMultiply< true >

A specialization of ConditionalMultiply that skips the multiplication.

Definition at line 55 of file indexing.hpp.

Member Function Documentation

◆ multiply()

template<typename A , typename B >
static constexpr A LvArray::indexing::ConditionalMultiply< true >::multiply ( A const  a,
B const &   
)
inlinestatic
Template Parameters
AThe type of a.
Bthe type of b.
Returns
Return a since the second argument is assumed to be 1.
Parameters
aThe value to return.
Note
The second argument is passed by reference so that you can do
ConditionalMultiply< true >( 5, *static_cast< int * >( nullptr ) )
.

Definition at line 66 of file indexing.hpp.


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