C++ : Ignored qualifiers (-Wignored-qualifiers)
What is an ignored qualifier? Well, in a class, lets have a student class: #include <string> class Student { public: const std::string Name; private: bool m_Present; public: Student(const std::string& p_Name) : Name(p_Name), m_Present { } void SetPresent() { m_Present = true; } void SetAbsent() { m_Present = false; } }; Now, we may want to access the present flag, therefore provide a function to do so: bool Present() const { return m_Present } This function is telling the user of our class quite a bit, it tells them that the return type is boolean and that the calling...
Comments
Post a Comment