From: Jeff Squyres Date: January 18, 2008 1:18:33 PM CST To: mpi-21@XXXXXXXXXXXXX Subject: Re: [mpi-21] const MPI C++ handles Reply-To: mpi-21@XXXXXXXXXXXXX On Jan 18, 2008, at 2:11 PM, Erez Haba wrote: > I looked up this issue and did not find a C++ *standard* that spans > that many platforms and compilers. > > The ISO C++ 98 standard itself does have libraries, but they > provide the headers which are less ambiguous. (including various > const values (like INT_MAX)) (think ABI :)) Hah! Surely you're not implying that C++ compilers produce code that is ABI-compatible with other C++ compilers? :-D > I agree that we'll need to enable the recommendation in the > standard interface. We'll need to agree that the semantic of > changing the underlying MPI handle is not changing the object (and > thus can define the method as const). > > I don't think you'll need an overloaded function for the Set_* > functions; const methods are good for non const objects. Good point -- a const method will match a corresponding non-const (*this). Just trying to be cautious: would there ever be a reason to have a non-const version of the Set_* functions? -- Jeff Squyres Cisco Systems