Blaze  3.6
AsConst.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_UTIL_ASCONST_H_
36 #define _BLAZE_UTIL_ASCONST_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // ASCONST FUNCTIONALITY
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
63 template< typename T >
64 inline constexpr AddConst_t<T>& as_const( T& v ) noexcept
65 {
66  return v;
67 }
68 //*************************************************************************************************
69 
70 
71 //*************************************************************************************************
85 template< typename T >
86 void as_const( const T&& ) = delete;
87 //*************************************************************************************************
88 
89 } // namespace blaze
90 
91 #endif
Header file for the AddConst type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
typename AddConst< T >::Type AddConst_t
Auxiliary alias declaration for the AddConst type trait.The AddConst_t alias declaration provides a c...
Definition: AddConst.h:95
constexpr AddConst_t< T > & as_const(T &v) noexcept
Adding 'const' to the given lvalue.
Definition: AsConst.h:64