g++ error
[…]/tuple:1394:33: error: no match for 'operator==' (operand types are […] {aka 'const ternary::uter<9>'} and […] {aka 'const ternary::uter<9>'}) 1394 | return bool(std::get<__i>(__t) == std::get<__i>(__u)) In file included from ../test.cxx:7: ../ternary.hxx:133:20: note: candidate: 'constexpr bool ternary::uter::operator==(ternary::uter) [with int Trits = 9]' 133 | constexpr bool operator==(uter b) noexcept ../ternary.hxx:133:20: note: passing […] {aka 'const ternary::uter<9>*'} as 'this' argument discards qualifiers
what the absolute wankg++ error
re: g++ error
constexpr applies to the function and means "compiler may execute this at compile time if it feels like it or has to" and it applies to the function. This error seems to be about the "this" argument, the special hidden argument every member function has, that you can qualify with const/volatile/ref(&)/rvalue_ref(&&) after the parameter list, usually before noexcept (though not sure if that last part is a hard rule). Default is reference (not const, not volatile, not rvalue).
Examples:
// const ref
bool operator==(uter) const;
// rvalue ref
bool operator==(uter) &&;
// explicit ref to overload rvalue ref
bool operator==(uter) &;
re: g++ error
re: g++ error
re: g++ error
re: g++ error
Guess I never even tried const after noexcept myself, but would expect a different error if that's not allowed.
re: g++ error