SUNphi  1.0
Adj.hpp
Go to the documentation of this file.
1 #ifndef _ADJ_HPP
2 #define _ADJ_HPP
3 
4 /// \file Adj.hpp
5 ///
6 /// \brief Defines the adjoint as transposed of the conjugated
7 
8 #include <smet/BaseSmET.hpp>
9 #include <smet/Conj.hpp>
10 #include <smet/Transpose.hpp>
11 
12 namespace SUNphi
13 {
14  /// Adjoint expression \c ref
15  template <typename T, // Type to adjoint
16  SFINAE_ON_TEMPLATE_ARG(isSmET<T>)>
17  DECLAUTO adj(T&& ref) ///< Quantity to adjoint
18  {
19  //cout<<"Adjoining type "<<T::name()<<endl;
20  return transpose(conj(forw<T>(ref)));
21  }
22 }
23 
24 #endif
#define SFINAE_ON_TEMPLATE_ARG(...)
Definition: SFINAE.hpp:24
#define DECLAUTO
Short name for decltype(auto)