What does this keyword specify ?

Hello there,
I know that the operator keyword is used to overload operators in classes, but i really can't find out what it stands for here, i did some search but couldn't find anything about it.
the code is a part of the ChessPlusPlus project: ChessPlusPlus-master/src/util/JsonReader.hpp

1
2
3
4
5
6

operator std::string() const noexcept(noexcept(std::string("")))
{
        return static_cast<char const *>(value);
}
  


this function member is supposed to return the string representation of a string value, not sure if this hint would be relevant to the question !! ;)

Any explanation would be appreciated.
Last edited on
I believe they are called "Conversion Operators", overloading between custom types. I have not used them but hopefully googling conversion operator can help you (or someone else more knowledgeable).
Last edited on
Thanks my friend :)
Topic archived. No new replies allowed.