SUNphi  1.0
Unused.hpp
Go to the documentation of this file.
1 #ifndef _UNUSED_HPP
2 #define _UNUSED_HPP
3 
4 /// \file Unused.hpp
5 ///
6 /// \brief Header file to suppress "Unused Variable" warning
7 
8 #include <metaprogramming/TypeTraits.hpp>
9 
10 /// Dummy function to be called to suppress "Unused Variable" warning
11 ///
12 /// Example:
13 /// \code
14 /// const int a=10;
15 /// maybeUnused(a);
16 /// \endcode
17 template<typename T>
18 inline void maybeUnused(const T&) ///< Variable to be suppressed
19 {
20 }
21 
22 /// Suppress the "Unused Variable" warning at any scope
23 #define MAYBE_UNUSED(A)
24  /*! Forward declaration of a dummy function, used to suppress "Unused variable" warning */
25  /*! \return the type of A */
26  Conditional<0,decltype(maybeUnused(A)),void> maybeUnusedFD()
27 
28 #endif
void maybeUnused(const T &)
Definition: Unused.hpp:18