I have a piece of code resembling the following (other details omitted for brevity):
template <uint First, uint Second, typename T>
struct Thing {
std::shared_ptr<T> asdf;
uint get() const { this->asdf->get_value<First,Second>(); }
};
... producing the following error in GCC 7:
error: expected primary-expression before ')' token
uint get() const { this->asdf->get_value<First,Second>(); }
^
Clang 4.0.1 reports no warnings with -Weverything
(excepting very pedantic things like c++98 compatibility warnings); same thing with GCC 7 and -W{all,extra,effc++,pedantic}
.
I was previously unaware of this question; while the answer to my problem is certainly outlined there, the error message didn't make it plain that was the problem. Supposing I deleted this question and its associated answer, other people searching for this error message will only run across the questions I found -- that is, the ones indicating the problem was caused by passing a type as a function argument instead of passing a value.