From 938f3dc425b1df5d140d10366cd958ac082c3b13 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Tue, 27 Aug 2013 11:37:21 +0200 Subject: [PATCH] arrays: workaround a bug in clang 3.3 release ? - Apparently there is a bug in release 3.3 of clang (? on kondo cluster ?) that crash the compiler in compiling a test. Pb not present in clang from svn. Changed a little bit the libs as a workaround. --- triqs/utility/mini_vector.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/triqs/utility/mini_vector.hpp b/triqs/utility/mini_vector.hpp index 4f1d31f5..dee1885f 100644 --- a/triqs/utility/mini_vector.hpp +++ b/triqs/utility/mini_vector.hpp @@ -144,12 +144,23 @@ namespace triqs { namespace utility { } struct tuple_to_mini_vector_aux { template V * operator()(M const & m, V * v) { *v = m; return ++v;}}; + + // change : the first version crash clang 3.3, but not svn version. + // must be a bug, corrected since then +/* template mini_vector tuple_to_mini_vector(std::tuple const & t) { mini_vector res; triqs::tuple::fold(tuple_to_mini_vector_aux(),t,&res[0]); return res; } +*/ + template + mini_vector::value> tuple_to_mini_vector(TU const & t) { + mini_vector::value> res; + triqs::tuple::fold(tuple_to_mini_vector_aux(),t,&res[0]); + return res; + } }}//namespace triqs::arrays #endif