It is currently Tue Feb 07, 2012 7:44 pm

All times are UTC



Welcome
Welcome to RHAPSODY4YOU

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today.





 Page 1 of 1 [ 5 posts ] 
Author Message
 Post subject: Non member functions
PostPosted: Fri Mar 06, 2009 1:21 pm 

Joined: Wed May 07, 2008 3:50 pm
Posts: 148
Location: Horsham, W Sussex, England
Can Rhapsody in C++ be used to generate non member functions?

Eg: Effective C++ 55 Specific Ways to Improve Your Program and Design 3rd Ed
Item 23 - Prefer non-member non-friend functions to member functions
Iem 24 - Declare non-member functions when type conversions should apply to all parameters

And from C++ Coding Standards 101 Rules, Guidelines, and Best Practices By Herb Sutter and Andrei Alexandrescu
Chapter 44 - Prefer writing nonmember nonfriend functions
Chapter 57 - Keep a type and its nonmember function interface in the same namespace


Offline
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 7:03 pm 

Joined: Thu Aug 30, 2007 4:31 pm
Posts: 152
Location: Germany
here you go... attached an example


Attachments:
NonMemberAsFriend_.zip [8.28 KiB]
Downloaded 20 times
Offline
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 9:31 pm 
User avatar

Joined: Thu Sep 13, 2007 7:34 pm
Posts: 397
Location: London
I had a look at the example and I read the section from the book.

Is this problem entirely associated with classes that represent numerics?

How does Java solve the issue?


Offline
 Profile  
 
 Post subject: Here are some replies from the 'other' forum
PostPosted: Tue Mar 10, 2009 1:04 pm 

Joined: Wed May 07, 2008 3:50 pm
Posts: 148
Location: Horsham, W Sussex, England
http://www.ibm.com/developerworks/forums/thread.jspa?threadID=254251&tstart=0


Offline
 Profile  
 
 Post subject:
PostPosted: Thu Mar 12, 2009 11:31 am 

Joined: Thu Aug 30, 2007 4:31 pm
Posts: 152
Location: Germany
Hi Shanz

never got any feedback from you if the sample fits to your needs..
In the meanwhile I've cleaned it up.. available in the sample section

http://www.rhapsody4you.org/rhapsody-7- ... -t240.html

Maybe you can write a reference to this sample in the IBM forum :-D


Attachments:
friend.jpg
friend.jpg [ 18.41 KiB | Viewed 202 times ]
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:


suspicion-preferred