mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 05:43:40 +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:
parent
3078401cb6
commit
938f3dc425
@ -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;}};
|
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>
|
template<typename T, typename ... U>
|
||||||
mini_vector<T,sizeof...(U)> tuple_to_mini_vector(std::tuple<U...> const & t) {
|
mini_vector<T,sizeof...(U)> tuple_to_mini_vector(std::tuple<U...> const & t) {
|
||||||
mini_vector<T,sizeof...(U)> res;
|
mini_vector<T,sizeof...(U)> res;
|
||||||
triqs::tuple::fold(tuple_to_mini_vector_aux(),t,&res[0]);
|
triqs::tuple::fold(tuple_to_mini_vector_aux(),t,&res[0]);
|
||||||
return res;
|
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
|
}}//namespace triqs::arrays
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user