Xref: utzoo comp.object:1519 comp.lang.c++:8644 Path: utzoo!attcan!uunet!microsoft!bobatk From: bobatk@microsoft.UUCP (Bob ATKINSON) Newsgroups: comp.object,comp.lang.c++ Subject: operator:: Message-ID: <56114@microsoft.UUCP> Date: 27 Jul 90 17:03:01 GMT Reply-To: bobatk@microsoft.UUCP (Bob ATKINSON) Organization: Microsoft Corp., Redmond WA Lines: 24 I am trying to understand why :: is not overloadable. E&S says in 13.4 "The reason for disallowing the overloading of ., .*, and :: is that they already have a predefined meaning for objects of any class as their first operand." Though this is true of . and .*, the first operand of :: is a class name, not an class instance. There therefore seems to me to be no confusion possible. Is there another reason that was not documented in E&S? I also do not fully understand the reasoning behind the prohibition of overloading . and .*. Yes, they have a predefined meaning for objects of any class as their first operand, but _only_ if their second operand is of type "pointer to member of ". Why not permit overloadings which specify second arguments of other types? My motivation for asking these questions comes from experiences in trying to choose appropriate operators in C++ to express operations that exist today as operators in some other widely used notations. Given the fixed set of operators, their fixed arities, precedences and associativities, choosing these operators is a very tedious exercise in design tradeoffs. _Any_ increase set of available operators would be greatly appreciated. Bob Atkinson Microsoft Applications Architecture Group