Re: [boost] Interest for a perl6-like-junctions-class?
by Rob Stewart other posts by this author
Jul 28 2005 12:07PM messages near this date
Re: [boost] index.htm frozen?
|
Re: [boost] [1.33.0] Final release schedule
SOURCE From: "Jeff Flinn" <TriumphSprint2000@[...].com>
>
> I just found this snippet of code in one of my projects:
>
> #include <boost/algorithm/string.hpp>
> #include <boost/algorithm/string/classification.hpp>
>
> bool NameValid( const std::string& aName )
> {
> using namespace boost::algorithm;
>
> return all( aName, !is_any_of(" -") );;
> }
>
> looks familiar eh? I totally forgot about this. I haven't looked in Pavol
> Droba's string algorithm library to see if there are additional facilities
> that cover other cases. The 'string' in Pavol's library defines string as a
> general concept and not as std::string.
That expression would be easier to read with the junctions idea:
none_of(aName) == any_of(" -");
(Assuming all of the above syntax can be made to work!)
Don't you agree?
--
Rob Stewart stewart@[...].com
Software Engineer http://www.sig.com
Susquehanna International Group, LLP using std::disclaimer;
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|