3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 06:14:14 +01:00

gcc compilation detail

This commit is contained in:
Olivier Parcollet 2014-09-10 17:36:26 +02:00
parent 672834fd68
commit d1c8a9a46e

View File

@ -73,17 +73,17 @@ namespace triqs { namespace tuple {
template<typename T, int R> struct make_tuple_repeat_impl; template<typename T, int R> struct make_tuple_repeat_impl;
template <typename T> struct make_tuple_repeat_impl<T, 1> { template <typename T> struct make_tuple_repeat_impl<T, 1> {
static std::tuple<T> invoke(T&&x) { return {x};} static std::tuple<T> invoke(T &&x) { return std::make_tuple(x); }
}; };
template <typename T> struct make_tuple_repeat_impl<T, 2> { template <typename T> struct make_tuple_repeat_impl<T, 2> {
static std::tuple<T,T> invoke(T&&x) { return {x,x};} static std::tuple<T, T> invoke(T &&x) { return std::make_tuple(x, x); }
}; };
template <typename T> struct make_tuple_repeat_impl<T, 3> { template <typename T> struct make_tuple_repeat_impl<T, 3> {
static std::tuple<T,T,T> invoke(T&&x) { return {x,x,x};} static std::tuple<T, T, T> invoke(T &&x) { return std::make_tuple(x, x, x); }
}; };
template <typename T> struct make_tuple_repeat_impl<T, 4> { template <typename T> struct make_tuple_repeat_impl<T, 4> {
static std::tuple<T,T,T,T> invoke(T &&x) { return {x, x, x, x}; } static std::tuple<T, T, T, T> invoke(T &&x) { return std::make_tuple(x, x, x, x); }
}; };
template <int R, typename T> auto make_tuple_repeat(T &&x) { return make_tuple_repeat_impl<T, R>::invoke(std::forward<T>(x)); } template <int R, typename T> auto make_tuple_repeat(T &&x) { return make_tuple_repeat_impl<T, R>::invoke(std::forward<T>(x)); }