ALPSCore reference
is_scalar.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1998-2018 ALPS Collaboration. See COPYRIGHT.TXT
3  * All rights reserved. Use is subject to license terms. See LICENSE.TXT
4  * For use in publications, see ACKNOWLEDGE.TXT
5  */
6 
7 #ifndef ALPS_TYPE_TRAITS_IS_SCALAR_H
8 #define ALPS_TYPE_TRAITS_IS_SCALAR_H
9 
10 #include <type_traits>
11 
12 #include "alps/numeric/scalar.hpp"
13 
14 namespace alps {
16 
23  template <typename T>
24  struct is_scalar: public std::is_same<T,typename alps::numeric::scalar<T>::type> {};
25 } // end namespace alps
26 
27 #endif // ALPS_TYPE_TRAITS_IS_SCALAR_H
Metafunction-predicate: returns true_type if type T is scalar.
Definition: is_scalar.hpp:24