[Gllug] C++ Templates, Opinions?
Richard Jones
rich at annexia.org
Mon Dec 20 00:10:06 UTC 2004
On Sun, Dec 19, 2004 at 11:44:26PM +0000, Nix wrote:
> > or regular expressions, or
>
> See Boost.
Ah yes ...
template <class BidirectionalIterator, class Allocator, class charT,
class traits, class Allocator2>
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
match_results<BidirectionalIterator, Allocator>& m,
const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default);
template <class BidirectionalIterator, class charT, class traits, class Allocator2>
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default);
template <class charT, class Allocator, class traits, class Allocator2>
bool regex_match(const charT* str, match_results<const charT*, Allocator>& m,
const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default);
template <class ST, class SA, class Allocator, class charT,
class traits, class Allocator2>
bool regex_match(const basic_string<charT, ST, SA>& s,
match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default);
template <class charT, class traits, class Allocator2>
bool regex_match(const charT* str,
const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default);
template <class ST, class SA, class charT, class traits, class Allocator2>
bool regex_match(const basic_string<charT, ST, SA>& s,
const basic_regex<charT, traits, Allocator2>& e,
match_flag_type flags = match_default);
It's so simple when you know how :-)
$str =~ /regex/;
Boost's garbage collection seems to be based on reference counting (am
I right in saying this?) Refcounting isn't really garbage collection
at all, and it imposes a serious overhead in both space and time. One
weakness of Perl, which should be fixed in Perl6 IIRC.
Rich.
--
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
>>> http://www.team-notepad.com/ - collaboration tools for teams <<<
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Use Perl libs in OCaml - http://www.merjis.com/developers/perl4caml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20041220/09cd41cf/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list