Does it make sense to add attribute to operator overload functions ?
Jkpl via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Oct 25 10:14:50 PDT 2014
Everything is in the Q. I ask this because those functions are
hidden behind symbols and keywords (+=, ~, in, etc.). It's not
that obvious for a user who would write a custom type.
e.g:
-----------
struct myType
{
@safe nothrow opIndexAssign(t1 paramValue,t2 paramIndex){}
}
-----------
are the attributes necessary ? Are opXXX functions handled just
like any other functs ? (traversal compat. of the attribs)
More information about the Digitalmars-d-learn
mailing list