foo.cc: In function ‘void sc(T&)’:
foo.cc:243:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
243 | if constexpr (is_same_v<T, int>) {
| ^~~~~~~~~
foo.cc:243:17: error: ‘is_same_v’ was not declared in this scope
243 | if constexpr (is_same_v<T, int>) {
| ^~~~~~~~~
foo.cc:243:28: error: expected primary-expression before ‘,’ token
243 | if constexpr (is_same_v<T, int>) {
| ^
foo.cc:243:30: error: expected primary-expression before ‘int’
243 | if constexpr (is_same_v<T, int>) {
| ^~~
foo.cc:243:29: error: expected ‘)’ before ‘int’
243 | if constexpr (is_same_v<T, int>) {
| ~ ^~~~
| )
foo.cc:245:13: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
245 | } else if constexpr (is_same_v<T, char>) {
| ^~~~~~~~~
foo.cc:245:35: error: expected primary-expression before ‘,’ token
245 | } else if constexpr (is_same_v<T, char>) {
| ^
foo.cc:245:37: error: expected primary-expression before ‘char’
245 | } else if constexpr (is_same_v<T, char>) {
| ^~~~
foo.cc:245:36: error: expected ‘)’ before ‘char’
245 | } else if constexpr (is_same_v<T, char>) {
| ~ ^~~~~
| )
foo.cc:247:13: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
247 | } else if constexpr (is_same_v<T, long long>) {
| ^~~~~~~~~
foo.cc:247:35: error: expected primary-expression before ‘,’ token
247 | } else if constexpr (is_same_v<T, long long>) {
| ^
foo.cc:247:37: error: expected primary-expression before ‘long’
247 | } else if constexpr (is_same_v<T, long long>) {
| ^~~~
foo.cc:247:36: error: expected ‘)’ before ‘long’
247 | } else if constexpr (is_same_v<T, long long>) {
| ~ ^~~~~
| )
foo.cc: In function ‘void pr(T)’:
foo.cc:266:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
266 | if constexpr (is_same_v<T, int>) {
| ^~~~~~~~~
foo.cc:266:17: error: ‘is_same_v’ was not declared in this scope
266 | if constexpr (is_same_v<T, int>) {
| ^~~~~~~~~
foo.cc:266:28: error: expected primary-expression before ‘,’ token
266 | if constexpr (is_same_v<T, int>) {
| ^
foo.cc:266:30: error: expected primary-expression before ‘int’
266 | if constexpr (is_same_v<T, int>) {
| ^~~
foo.cc:266:29: error: expected ‘)’ before ‘int’
266 | if constexpr (is_same_v<T, int>) {
| ~ ^~~~
| )
foo.cc:268:13: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
268 | } else if constexpr (is_same_v<T, char>) {
| ^~~~~~~~~
foo.cc:268:35: error: expected primary-expression before ‘,’ token
268 | } else if constexpr (is_same_v<T, char>) {
| ^
foo.cc:268:37: error: expected primary-expression before ‘char’
268 | } else if constexpr (is_same_v<T, char>) {
| ^~~~
foo.cc:268:36: error: expected ‘)’ before ‘char’
268 | } else if constexpr (is_same_v<T, char>) {
| ~ ^~~~~
| )
foo.cc:270:13: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
270 | } else if constexpr (is_same_v<T, long long>) {
| ^~~~~~~~~
foo.cc:270:35: error: expected primary-expression before ‘,’ token
270 | } else if constexpr (is_same_v<T, long long>) {
| ^
foo.cc:270:37: error: expected primary-expression before ‘long’
270 | } else if constexpr (is_same_v<T, long long>) {
| ^~~~
foo.cc:270:36: error: expected ‘)’ before ‘long’
270 | } else if constexpr (is_same_v<T, long long>) {
| ~ ^~~~~
| )
foo.cc: At global scope:
foo.cc:287:1: error: ‘minarray’ function uses ‘auto’ type specifier without trailing return type
287 | auto minarray(const T &a) {
| ^~~~
foo.cc:287:1: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
foo.cc:291:1: error: ‘maxarray’ function uses ‘auto’ type specifier without trailing return type
291 | auto maxarray(const T &a) {
| ^~~~
foo.cc:291:1: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
foo.cc:553:39: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
553 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~~~~~~~~~
foo.cc:553:34: note: ‘std::enable_if_t’ is only available from C++14 onwards
553 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~
foo.cc:553:50: error: expected ‘>’ before ‘<’ token
553 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^
foo.cc: In function ‘int popcnt(T)’:
foo.cc:555:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
555 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~
foo.cc:555:22: error: ‘is_signed_v’ is not a member of ‘std’; did you mean ‘is_signed’?
555 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~~~
| is_signed
foo.cc:555:35: error: expected primary-expression before ‘>’ token
555 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc:555:36: error: expected primary-expression before ‘)’ token
555 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc: At global scope:
foo.cc:561:39: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
561 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~~~~~~~~~
foo.cc:561:34: note: ‘std::enable_if_t’ is only available from C++14 onwards
561 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~
foo.cc:561:50: error: expected ‘>’ before ‘<’ token
561 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^
foo.cc: In function ‘int popcnt_mod_2(T)’:
foo.cc:563:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
563 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~
foo.cc:563:22: error: ‘is_signed_v’ is not a member of ‘std’; did you mean ‘is_signed’?
563 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~~~
| is_signed
foo.cc:563:35: error: expected primary-expression before ‘>’ token
563 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc:563:36: error: expected primary-expression before ‘)’ token
563 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc: At global scope:
foo.cc:569:39: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
569 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~~~~~~~~~
foo.cc:569:34: note: ‘std::enable_if_t’ is only available from C++14 onwards
569 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~
foo.cc:569:50: error: expected ‘>’ before ‘<’ token
569 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^
foo.cc: In function ‘int topbit(T)’:
foo.cc:574:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
574 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~
foo.cc:574:22: error: ‘is_signed_v’ is not a member of ‘std’; did you mean ‘is_signed’?
574 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~~~
| is_signed
foo.cc:574:35: error: expected primary-expression before ‘>’ token
574 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc:574:36: error: expected primary-expression before ‘)’ token
574 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc: At global scope:
foo.cc:580:39: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
580 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~~~~~~~~~
foo.cc:580:34: note: ‘std::enable_if_t’ is only available from C++14 onwards
580 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^~~
foo.cc:580:50: error: expected ‘>’ before ‘<’ token
580 | template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
| ^
foo.cc: In function ‘int lowbit(T)’:
foo.cc:585:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
585 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~
foo.cc:585:22: error: ‘is_signed_v’ is not a member of ‘std’; did you mean ‘is_signed’?
585 | if constexpr (std::is_signed_v<T>) {
| ^~~~~~~~~~~
| is_signed
foo.cc:585:35: error: expected primary-expression before ‘>’ token
585 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc:585:36: error: expected primary-expression before ‘)’ token
585 | if constexpr (std::is_signed_v<T>) {
| ^
foo.cc: In function ‘void solve()’:
foo.cc:210:25: error: ‘decay_t’ was not declared in this scope; did you mean ‘key_t’?
210 | #define rep7(i, a) for (decay_t<decltype(a)> i = 1; i <= (a); ++i)
| ^~~~~~~
foo.cc:224:39: note: in expansion of macro ‘rep7’
224 | #define overload4(a, b, c, d, e, ...) e
| ^
foo.cc:228:19: note: in expansion of macro ‘overload4’
228 | #define rep1(...) overload4(__VA_ARGS__, rep9, rep8, rep7, rep6)(__VA_ARGS__)
| ^~~~~~~~~
foo.cc:829:3: note: in expansion of macro ‘rep1’
829 | rep1(i, n) {
| ^~~~
foo.cc:210:33: error: expected primary-expression before ‘decltype’
210 | #define rep7(i, a) for (decay_t<decltype(a)> i = 1; i <= (a); ++i)
| ^~~~~~~~~~~
foo.cc:224:39: note: in expansion of macro ‘rep7’
224 | #define overload4(a, b, c, d, e, ...) e
| ^
foo.cc:228:19: note: in expansion of macro ‘overload4’
228 | #define rep1(...) overload4(__VA_ARGS__, rep9, rep8, rep7, rep6)(__VA_ARGS__)
| ^~~~~~~~~
foo.cc:829:3: note: in expansion of macro ‘rep1’
829 | rep1(i, n) {
| ^~~~
foo.cc:829:8: error: ‘i’ was not declared in this scope; did you mean ‘vi’?
829 | rep1(i, n) {
| ^
foo.cc:210:53: note: in definition of macro ‘rep7’
210 | #define rep7(i, a) for (decay_t<decltype(a)> i = 1; i <= (a); ++i)
| ^
foo.cc:829:3: note: in expansion of macro ‘rep1’
829 | rep1(i, n) {
| ^~~~