ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Re: static sized strings
by Reece Dunn other posts by this author
May 21 2004 7:23PM messages near this date
[boost] Re: boost.css validation | Re: [boost] Re: static sized strings
Rob Stewart wrote:
> From: "Reece Dunn" <msclrhd@[...].com>
>  > Nothing. You do indeed need two functions:
>  >    iterator iter_offset( difference_type );
>  >    const_iterator const_iter_offset( difference_type ) const;
> 
> Why?  This is perfectly valid C++:
> 
>     iterator iter_offset(different_type);
>     const_iterator iter_offset(different_type) const;
> 
> So is there something in how you want to use them that precludes
> your overloading them that way?

No. I was not aware that it is possible to do this. I have now adopted
   struct char_string
   {
      ...
      virtual iterator iter_offset(different_type) = 0;
      virtual const_iterator iter_offset(different_type) const = 0;
   };
into my implementation.

Q: Since the above is valid C++, is the following?:
   virtual void myfn( char ) = 0;
   virtual void myfn( int, bool ) = 0;

Because I had assumed that you could not do this, since (1) I haven't read 
the standard that properly, I have mainly focused on learning from other 
books (like Stroustrup, 3ed) and (2) I haven't seen any code that uses 
virtual functions like char_string above or my question.

Regards,
Reece

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Reece Dunn
Aleksey Gurtovoy
Rob Stewart
John Nagle
David Abrahams
Rob Stewart
Rob Stewart

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved