Blaze 3.9
Loading...
Searching...
No Matches
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
46namespace blaze {
47
48//=================================================================================================
49//
50// ASCONST FUNCTIONALITY
51//
52//=================================================================================================
53
54//*************************************************************************************************
63template< typename T >
64constexpr AddConst_t<T>& as_const( T& v ) noexcept
65{
66 return v;
67}
68//*************************************************************************************************
69
70
71//*************************************************************************************************
85template< typename T >
86void as_const( const T&& ) = delete;
87//*************************************************************************************************
88
89} // namespace blaze
90
91#endif
Header file for the AddConst type trait.
typename AddConst< T >::Type AddConst_t
Auxiliary alias declaration for the AddConst type trait.
Definition AddConst.h:95
constexpr AddConst_t< T > & as_const(T &v) noexcept
Adding 'const' to the given lvalue.
Definition AsConst.h:64