Does a class with all attributes const need to have member function declared const as well?
问题 The title already says all. Let me expand a little nevertheless: I've class whose all attributes are const : template< class perm = Perm16 > class PermutationGroup { public: using StrongGeneratingSet = std::vector< std::vector< perm > >; const std::string name; const uint64_t N; const StrongGeneratingSet sgs; PermutationGroup(std::string name, uint64_t N, StrongGeneratingSet sgs) : name(name), N(N), sgs(sgs) { assert(check_sgs()); }; bool check_sgs() const; // defined as const bool is