Author
anonymous
almost 6 years ago
Language
C++
Compiler
gcc 8.2.0
Options
Warnings
Don't Use Boost
C++17
no pedantic
Author
anonymous
almost 6 years ago
$ g++ prog.cc -Wall -Wextra -std=c++17
prog.cc: In instantiation of 'Sum<Container>::Sum(const std::initializer_list<typename Container::value_type>&) [with Container = std::array<int, 4>; typename Container::value_type = int]':
prog.cc:27:82: required from here
prog.cc:10:84: error: no matching function for call to 'std::array<int, 4>::array(const std::initializer_list<int>&)'
Sum(std::initializer_list<typename Container::value_type> const& il) : m_terms(il) { }
^
In file included from prog.cc:1:
/opt/wandbox/gcc-8.2.0/include/c++/8.2.0/array:94:12: note: candidate: 'std::array<int, 4>::array()'
struct array
^~~~~
/opt/wandbox/gcc-8.2.0/include/c++/8.2.0/array:94:12: note: candidate expects 0 arguments, 1 provided
/opt/wandbox/gcc-8.2.0/include/c++/8.2.0/array:94:12: note: candidate: 'constexpr std::array<int, 4>::array(const std::array<int, 4>&)'
/opt/wandbox/gcc-8.2.0/include/c++/8.2.0/array:94:12: note: no known conversion for argument 1 from 'const std::initializer_list<int>' to 'const std::array<int, 4>&'
/opt/wandbox/gcc-8.2.0/include/c++/8.2.0/array:94:12: note: candidate: 'constexpr std::array<int, 4>::array(std::array<int, 4>&&)'
/opt/wandbox/gcc-8.2.0/include/c++/8.2.0/array:94:12: note: no known conversion for argument 1 from 'const std::initializer_list<int>' to 'std::array<int, 4>&&'
Exit Code:
1