Blaze  3.6
DimensionOf.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_DIMENSIONOF_H_
36 #define _BLAZE_UTIL_DIMENSIONOF_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/MaybeUnused.h>
44 #include <blaze/util/Types.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // DIMENSIONOF FUNCTIONALITY
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
75 template< typename T, size_t N >
76 inline constexpr size_t dimensionof( T(&a)[N] )
77 {
78  MAYBE_UNUSED( a );
79  return N;
80 }
81 //*************************************************************************************************
82 
83 } // namespace blaze
84 
85 #endif
Header file for basic type definitions.
Header file for the MAYBE_UNUSED function template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
constexpr size_t dimensionof(T(&a)[N])
Static evaluation of array dimensions.
Definition: DimensionOf.h:76