I'm looking through some internal infrastructure code at the moment and I saw some functions defined as such:
// func_name is a class member function
some_return_type func_name() & {
// definition
}
some_return_type func_name() && {
// definition
}
some_return_type func_name() const& {
// definition
}
some_return_type func_name() const&& {
// definition
}
I know having const after a class member function name means it won't modify immutable member variables defined in the class. But what does &, &&, const &, and const && variants here mean?