3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-24 13:23:37 +01:00

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.
This commit is contained in:
Olivier Parcollet 2013-08-27 11:37:21 +02:00
parent 3078401cb6
commit 938f3dc425

View File

@ -144,12 +144,23 @@ namespace triqs { namespace utility {
}
struct tuple_to_mini_vector_aux { template<typename M, typename V> 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<typename T, typename ... U>
mini_vector<T,sizeof...(U)> tuple_to_mini_vector(std::tuple<U...> const & t) {
mini_vector<T,sizeof...(U)> res;
triqs::tuple::fold(tuple_to_mini_vector_aux(),t,&res[0]);
return res;
}
*/
template<typename T, typename TU>
mini_vector<T,std::tuple_size<TU>::value> tuple_to_mini_vector(TU const & t) {
mini_vector<T,std::tuple_size<TU>::value> res;
triqs::tuple::fold(tuple_to_mini_vector_aux(),t,&res[0]);
return res;
}
}}//namespace triqs::arrays
#endif