Рассмотрим этот код:
std::vector<
std::tuple<std::vector<std::size_t>,
std::vector<std::size_t>,
std::vector<std::size_t>>
> foo = {
{{2, 1, 2, 3}, {1, 2}, {2, 3}},
{{2, 3, 4, 0}, {3}, {2, 3, 4}},
{{2, 3, 4, 0}, {0}, {3, 4, 0}},
};
В Clang и GCC 6 или новее он компилируется нормально.В GCC 5.5 выдает эту ошибку:
In function 'int main()':
:16:4: error: converting to
'std::tuple<std::vector<long unsigned int, std::allocator<long unsigned int> >,
std::vector<long unsigned int, std::allocator<long unsigned int> >,
std::vector<long unsigned int, std::allocator<long unsigned int> > >'
from initializer list would use explicit constructor
'constexpr std::tuple< <template-parameter-1-1> >::tuple(const _Elements& ...)
[with _Elements = {
std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >}]'
};
^
Почему это так и как я могу обойти это?