Author
anonymous
almost 7 years ago
Language
Compiler
Options
Author
anonymous
almost 7 years ago
$
prog.cc: In instantiation of 'constexpr std::size_t multi_array<T, N>::linearized_index(meta::index_sequence<I ...>, Idx ...) const [with long unsigned int ...I = {0}; Idx = {int, int}; T = double; long unsigned int ...N = {2, 2}; std::size_t = long unsigned int]':
prog.cc:73:21: required from 'constexpr T multi_array<T, N>::operator()(Idx ...) const [with Idx = {int, int}; T = double; long unsigned int ...N = {2, 2}]'
prog.cc:81:20: required from here
prog.cc:60:5: error: body of 'constexpr' function 'constexpr std::size_t multi_array<T, N>::linearized_index(meta::index_sequence<I ...>, Idx ...) const [with long unsigned int ...I = {0}; Idx = {int, int}; T = double; long unsigned int ...N = {2, 2}; std::size_t = long unsigned int]' not a return-statement
}
^
prog.cc: In instantiation of 'constexpr T multi_array<T, N>::operator()(Idx ...) const [with Idx = {int, int}; T = double; long unsigned int ...N = {2, 2}]':
prog.cc:81:20: required from here
prog.cc:76:5: error: body of 'constexpr' function 'constexpr T multi_array<T, N>::operator()(Idx ...) const [with Idx = {int, int}; T = double; long unsigned int ...N = {2, 2}]' not a return-statement
}
^
prog.cc: In function 'int main()':
prog.cc:81:27: error: non-constant condition for static assertion
static_assert(b(1, 1) == 1, "!");
~~~~~~~~^~~~
prog.cc:81:20: error: 'constexpr T multi_array<T, N>::operator()(Idx ...) const [with Idx = {int, int}; T = double; long unsigned int ...N = {2, 2}]' called in a constant expression
static_assert(b(1, 1) == 1, "!");
~^~~~~~
prog.cc:72:17: note: 'constexpr T multi_array<T, N>::operator()(Idx ...) const [with Idx = {int, int}; T = double; long unsigned int ...N = {2, 2}]' is not usable as a 'constexpr' function because:
constexpr T operator()(Idx... idx) const noexcept {
^~~~~~~~
Exit Code:
1