0_0_37881718_19428.cpp: In static member function 'static constexpr void mint::fix(int&)':
0_0_37881718_19428.cpp:11:26: error: invalid return type 'void' of constexpr function 'static constexpr void mint::fix(int&)'
static constexpr void fix(int &x) { x+=(x>>31)&P; }
^
0_0_37881718_19428.cpp: In member function 'constexpr mint& mint::set(const int&) const':
0_0_37881718_19428.cpp:14:48: error: assignment of member 'mint::x' in read-only object
constexpr mint& set(const int &o) { return x=o, *this; }
^
0_0_37881718_19428.cpp:14:53: error: invalid initialization of reference of type 'mint&' from expression of type 'const mint'
constexpr mint& set(const int &o) { return x=o, *this; }
^
0_0_37881718_19428.cpp:14:59: error: body of constexpr function 'constexpr mint& mint::set(const int&) const' not a return-statement
constexpr mint& set(const int &o) { return x=o, *this; }
^
0_0_37881718_19428.cpp: In member function 'constexpr mint& mint::operator+=(const mint&) const':
0_0_37881718_19428.cpp:16:62: error: assignment of member 'mint::x' in read-only object
constexpr mint& operator += (const mint &y) { return fix(x+=y.x-P), *this; }
^
0_0_37881718_19428.cpp:16:69: error: no matching function for call to 'mint::fix(const int&) const'
constexpr mint& operator += (const mint &y) { return fix(x+=y.x-P), *this; }
^
0_0_37881718_19428.cpp:16:69: note: candidate is:
0_0_37881718_19428.cpp:11:26: note: static constexpr void mint::fix(int&)
static constexpr void fix(int &x) { x+=(x>>31)&P; }
^
0_0_37881718_19428.cpp:11:26: note: no known conversion for argument 1 from 'const int' to 'int&'
0_0_37881718_19428.cpp:16:79: error: body of constexpr function 'constexpr mint& mint::operator+=(const mint&) const' not a return-statement
constexpr mint& operator += (const mint &y) { return fix(x+=y.x-P), *this; }
^
0_0_37881718_19428.cpp: In member function 'constexpr mint& mint::operator-=(const mint&) const':
0_0_37881718_19428.cpp:18:62: error: assignment of member 'mint::x' in read-only object
constexpr mint& operator -= (const mint &y) { return fix(x-=y.x), *this; }
^
0_0_37881718_19428.cpp:18:67: error: no matching function for call to 'mint::fix(const int&) const'
constexpr mint& operator -= (const mint &y) { return fix(x-=y.x), *this; }
^
0_0_37881718_19428.cpp:18:67: note: candidate is:
0_0_37881718_19428.cpp:11:26: note: static constexpr void mint::fix(int&)
static constexpr void fix(int &x) { x+=(x>>31)&P; }
^
0_0_37881718_19428.cpp:11:26: note: no known conversion for argument 1 from 'const int' to 'int&'
0_0_37881718_19428.cpp:18:77: error: body of constexpr function 'constexpr mint& mint::operator-=(const mint&) const' not a return-statement
constexpr mint& operator -= (const mint &y) { return fix(x-=y.x), *this; }
^
0_0_37881718_19428.cpp: In member function 'constexpr mint& mint::operator*=(const mint&) const':
0_0_37881718_19428.cpp:21:62: error: passing 'const mint' as 'this' argument of 'mint& mint::operator=(mint&&)' discards qualifiers [-fpermissive]
constexpr mint& operator *= (const mint &y) { return *this=*this*y; }
^
0_0_37881718_19428.cpp:21:69: error: invalid initialization of reference of type 'mint&' from expression of type 'const mint'
constexpr mint& operator *= (const mint &y) { return *this=*this*y; }
^
0_0_37881718_19428.cpp:21:72: error: body of constexpr function 'constexpr mint& mint::operator*=(const mint&) const' not a return-statement
constexpr mint& operator *= (const mint &y) { return *this=*this*y; }
^
0_0_37881718_19428.cpp: In instantiation of 'constexpr mint mint::pow(auto:1) const [with auto:1 = int]':
0_0_37881718_19428.cpp:23:52: required from here
0_0_37881718_19428.cpp:22:139: error: body of constexpr function 'constexpr mint mint::pow(auto:1) const [with auto:1 = int]' not a return-statement
constexpr mint pow(auto b) const { assert(x>0); mint a(*this),res(move(mint().set(1))); for(;b;b>>=1,a*=a) if(b&1) res*=a; return res; }
^
|