Subject: Re: [boost] [utility] new auto_buffer class --- RFC
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2009-03-02 11:18:41
On Mon, Mar 2, 2009 at 1:11 PM, Matt Calabrese <rivorus_at_[hidden]> wrote:
> On Mon, Mar 2, 2009 at 10:29 AM, Thorsten Ottosen <
> thorsten.ottosen_at_[hidden]> wrote:
>> I'm more scared by a #define that at the 256 default.
> Hmm? Why is that? On the contrary, I would say a #define here is simply good
> practice. A raw 256 is only providing a default at a level where you have
> little-to-no knowledge of what such a default should be. Allowing the
> default to be overridden via a #define lets a user easily override that
> value based on his own requirements, and do so without having to directly
> modify any boost code (often just from command line arguments to the
> compiler or from project settings in an IDE) and without having to use a
> metafunction/template alias/wrapper to make a new default for his or her
> domain. I see all of this as much more preferable to a strict default value
> of 256.
I rather have no default at all. It avoids ODR violations by defining different
defaults for different libraries, and there's no reason why one number would
be a better default than the other.
If someone wants to create a specific default, it can derive from auto_buffer.
> -Matt Calabrese
-- Felipe Magno de Almeida
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk