[Botan-devel] Using tr1/memory

Joel Low joel at joelsplace.sg
Wed Oct 1 10:22:09 EDT 2008


> -----Original Message-----
> From: botan-devel-bounces at randombit.net [mailto:botan-devel-
> bounces at randombit.net] On Behalf Of Jack Lloyd
> Sent: Wednesday, 1 October, 2008 8:50 PM
> To: botan-devel at randombit.net
> Subject: [Botan-devel] Using tr1/memory
> 
> On Wed, Oct 01, 2008 at 01:55:10PM +0800, Joel Low wrote:
> 
> > [Joel Low] Yes I tend to agree on that. Hmm. Is boost too large a
> > dependency to ask for?
> 
> I'm not sure. I asked about using TR1 in May:
> http://lists.randombit.net/pipermail/botan-devel/2008-May/000551.html
> 
> You were the only person who replied. I'm not sure if that means
> nobody cares at all about a TR1 dep, or nobody noticed the mail.
> 
> I would rather not rely on Boost. It is a fine library, but TR1
> includes most of the Boost libs that are obviously immediately useful
> in Botan (shared_ptr, function/bind, tuple, hash tables, regex), and
> the advantage of TR1 is it works out of the box, at least on some
> compilers. And unlike Boost, TR1 is going more or less unchanged into
> C++0x, which is the obvious path forward.
[Joel Low] Sorry for not being clear, I didn't mean a dependency on the
whole of Boost, but just the tr1 component. The description of
Boost::tr1 is:

The TR1 library provides an implementation of the C++ Technical Report
on Standard Library Extensions. This library does not itself implement
the TR1 components, rather it's a thin wrapper that will include your
standard library's TR1 implementation (if it has one), otherwise it will
include the Boost Library equivalents, and import them into namespace
std::tr1.

[Joel Low] I personally wouldn't mind a dependency on boost::tr1 because
I think quite a few apps will use boost anyway; and also because the
boost::tr1 library is a wrapper for the other boost components. In that
sense, the tr1 wrapper should remain pretty much consistent. From what I
know, compilers since VC2003 (VS 7.1) should be able to handle boost
without issue.

I must admit I've not been keeping up with C++0x and I'm not too sure
which bits of tr1 is being used in the Botan code (or will be of use),
but I think it would be good (both from a maintainability standpoint as
well as a readability standpoint) that we can adopt tr1. What do you
think? What are your reservations?

Joel



More information about the botan-devel mailing list