SUNphi  1.0
UnaryPlus.hpp
Go to the documentation of this file.
1 #ifndef _UNARYPLUS_HPP
2 #define _UNARYPLUS_HPP
3 
4 /// \file UnaryPlus.hpp
5 ///
6 /// \brief Header file for the definition of +smet
7 
8 #include <metaprogramming/SFINAE.hpp>
9 #include <metaprogramming/UniversalReferences.hpp>
10 #include <smet/BaseSmET.hpp>
11 
12 namespace SUNphi
13 {
14  /// Implement +smet: decays into smet itself
15  template <typename T, // Type of the expression
16  SFINAE_ON_TEMPLATE_ARG(isSmET<T>)>
17  DECLAUTO operator+(T&& smet) ///< Expression
18  {
19  return ~smet;
20  }
21 }
22 
23 #endif
#define SFINAE_ON_TEMPLATE_ARG(...)
Definition: SFINAE.hpp:24
#define DECLAUTO
Short name for decltype(auto)