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: concept archetypes
by Douglas Gregor other posts by this author
Oct 15 2002 9:47PM messages near this date
[boost] Re: concept archetypes | Re: [boost] Re: concept archetypes
On Tuesday 15 October 2002 04:38 pm, Craig Henderson wrote:
>  "v m" <boost_vam@[...].com> wrote in message
>  > 3. There are several differences between the standard
>  > and the current archetype classes, especially the
>  > iterator archetype classes. For example, almost all
>  > the relational operators (operator==, operator!= etc)
>  > have a return type of bool whereas the standard
>  > requires a return type convertible to bool. Would
>  > changing the return type have any unwanted
>  > consequences (not particularly in the
>  > concept_archetype.hpp) ?
> 
>  How is this not conforming to the standard? The return type is bool. The
>  standard requires a return type that is convertible to bool (Table 72).
>  bool is implicitly convertible to bool. What's the problem?
>  The synopsis of the iterator class in 24.2 itself defines the return type
>  as bool.

It's conforming, but it's not the best possible archetype. Concept archetypes 
should push the requirements as far as possible. So the relational operators 
for the archetype should each return a unique type that is implicitly 
convertible to 'bool' (thus making sure that no code assumes that the return 
type is exactly 'bool').

	Doug
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
v m
Craig Henderson
Douglas Gregor
Victor A. Wagner, Jr.
Douglas Gregor

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