3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 13:53:40 +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

@ -72,18 +72,18 @@ namespace triqs { namespace tuple {
/// Repeat an element
template<typename T, int R> struct make_tuple_repeat_impl;
template <typename T> struct make_tuple_repeat_impl<T,1> {
static std::tuple<T> invoke(T&&x) { return {x};}
template <typename T> struct make_tuple_repeat_impl<T, 1> {
static std::tuple<T> invoke(T &&x) { return std::make_tuple(x); }
};
template <typename T> struct make_tuple_repeat_impl<T,2> {
static std::tuple<T,T> invoke(T&&x) { return {x,x};}
template <typename T> struct make_tuple_repeat_impl<T, 2> {
static std::tuple<T, T> invoke(T &&x) { return std::make_tuple(x, x); }
};
template <typename T> struct make_tuple_repeat_impl<T,3> {
static std::tuple<T,T,T> invoke(T&&x) { return {x,x,x};}
template <typename T> struct make_tuple_repeat_impl<T, 3> {
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> {
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)); }