diff --git a/triqs/arrays/array.hpp b/triqs/arrays/array.hpp index d3ff72b9..2791be27 100644 --- a/triqs/arrays/array.hpp +++ b/triqs/arrays/array.hpp @@ -20,7 +20,7 @@ ******************************************************************************/ #ifndef TRIQS_ARRAYS_ARRAY_H #define TRIQS_ARRAYS_ARRAY_H -#include +#include #include "indexmaps/cuboid/map.hpp" #include "indexmaps/cuboid/slice.hpp" #include "impl/indexmap_storage_pair.hpp" @@ -45,7 +45,6 @@ namespace triqs { namespace arrays { typedef array regular_type; typedef array_view view_type; typedef array_view weak_view_type; - typedef void has_view_type_tag; /// Build from an IndexMap and a storage template array_view (indexmap_type const & Ind,S const & Mem): IMPL_TYPE(Ind, Mem) {} @@ -101,7 +100,6 @@ namespace triqs { namespace arrays { typedef array regular_type; typedef array_view view_type; typedef array_view weak_view_type; - typedef void has_view_type_tag; /// Empty array. explicit array(memory_layout ml = memory_layout(IMPL_TYPE::indexmap_type::traversal_order)) :IMPL_TYPE(ml){} diff --git a/triqs/arrays/matrix.hpp b/triqs/arrays/matrix.hpp index 18a983da..a1819165 100644 --- a/triqs/arrays/matrix.hpp +++ b/triqs/arrays/matrix.hpp @@ -54,7 +54,6 @@ namespace triqs { namespace arrays { typedef matrix regular_type; typedef matrix_view view_type; typedef matrix_view weak_view_type; - typedef void has_view_type_tag; typedef typename IMPL_TYPE::indexmap_type indexmap_type; typedef typename IMPL_TYPE::storage_type storage_type; @@ -116,7 +115,6 @@ namespace triqs { namespace arrays { typedef matrix regular_type; typedef matrix_view view_type; typedef matrix_view weak_view_type; - typedef void has_view_type_tag; /// Empty matrix. matrix(memory_layout<2> ml = memory_layout<2>(IMPL_TYPE::indexmap_type::traversal_order) ): IMPL_TYPE(indexmap_type(ml)) {} diff --git a/triqs/arrays/vector.hpp b/triqs/arrays/vector.hpp index 960bf365..8fcc482e 100644 --- a/triqs/arrays/vector.hpp +++ b/triqs/arrays/vector.hpp @@ -43,7 +43,6 @@ namespace triqs { namespace arrays { typedef vector regular_type; typedef vector_view view_type; typedef vector_view weak_view_type; - typedef void has_view_type_tag; typedef typename IMPL_TYPE::indexmap_type indexmap_type; typedef typename IMPL_TYPE::storage_type storage_type; @@ -110,7 +109,6 @@ namespace triqs { namespace arrays { typedef vector regular_type; typedef vector_view view_type; typedef vector_view weak_view_type; - typedef void has_view_type_tag; /// Empty vector. vector(){} diff --git a/triqs/gfs/local/tail.hpp b/triqs/gfs/local/tail.hpp index d0c34254..8cdbebcd 100644 --- a/triqs/gfs/local/tail.hpp +++ b/triqs/gfs/local/tail.hpp @@ -50,7 +50,6 @@ namespace triqs { namespace gfs { namespace local { /// A common implementation class. Idiom : ValueView template class tail_impl { public : - typedef void has_view_type_tag; // Idiom : ValueView typedef tail_view view_type; typedef tail regular_type; diff --git a/triqs/gfs/tools.hpp b/triqs/gfs/tools.hpp index a9d0ebe8..5c2eddb3 100644 --- a/triqs/gfs/tools.hpp +++ b/triqs/gfs/tools.hpp @@ -74,7 +74,6 @@ namespace triqs { namespace gfs { struct nothing { template explicit nothing(Args...) {} // takes anything, do nothing.. nothing() {} - typedef void has_view_type_tag; // Idiom : ValueView typedef nothing view_type; typedef nothing regular_type; void rebind (nothing){} diff --git a/triqs/utility/draft/value_view.hpp b/triqs/utility/draft/value_view.hpp index 129058ed..218e1f32 100644 --- a/triqs/utility/draft/value_view.hpp +++ b/triqs/utility/draft/value_view.hpp @@ -35,7 +35,6 @@ namespace triqs { friend class value_view; public: - typedef void has_view_type_tag; // Idiom : ValueView typedef value_view view_type; typedef value_view regular_type; typedef typename std::remove_cv::type >::type value_type; @@ -66,7 +65,6 @@ namespace triqs { std::shared_ptr p; friend class value_view; public: - typedef void has_view_type_tag; // Idiom : ValueView typedef value_view view_type; typedef value_view regular_type; typedef typename std::remove_cv::type >::type value_type; diff --git a/triqs/utility/view_tools.hpp b/triqs/utility/view_tools.hpp index 62b66c8e..39cc796c 100644 --- a/triqs/utility/view_tools.hpp +++ b/triqs/utility/view_tools.hpp @@ -24,10 +24,6 @@ namespace triqs { -// keep old solution for a while to check portability and then remove tag -#define TRIQS_DETECT_VIEWS -#ifdef TRIQS_DETECT_VIEWS - template void nop(T ...){}; template struct has_view : std::false_type {}; template struct has_view(),std::declval()))> : std::true_type {}; @@ -43,28 +39,14 @@ namespace triqs { template::value> struct const_view_type_if_exists_else_type; template struct const_view_type_if_exists_else_type {typedef T type;}; template struct const_view_type_if_exists_else_type {typedef const typename T::view_type type;}; - // template struct const_view_type_if_exists_else_type {typedef const typename T::view_type type;}; - -#else - - template struct regular_type_if_exists_else_type {typedef T type;}; - template struct regular_type_if_exists_else_type {typedef typename T::regular_type type;}; - - template struct view_type_if_exists_else_type {typedef T type;}; - template struct view_type_if_exists_else_type {typedef typename T::view_type type;}; - - template struct const_view_type_if_exists_else_type {typedef T type;}; - template struct const_view_type_if_exists_else_type {typedef const typename T::view_type type;}; - // template struct const_view_type_if_exists_else_type {typedef const typename T::view_type type;}; - -#endif + /* // replacement of std::plus for views ... template struct add_views : std::binary_function { - T operator() (const T& x, const T& y) const - { typename T::regular_type r(x); r =r + y; return r;} + T operator() (const T& x, const T& y) const + { typename T::regular_type r(x); r =r + y; return r;} }; - + */ }//namespace triqs #endif