|
Boost : |
Subject: Re: [boost] [Boost.Pool] TR1?
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-04-12 21:52:57
On 12 April 2011 20:17, Phil Bouchard <philippe_at_[hidden]> wrote:
> Once again if is_from() was implemented the following way:
>
> bool is_from(const char* p)
> { return p - buffer > 0 && p - buffer < sizeof(buffer); }
>
> Then the undefined behaviors would seem to go away.
What makes you believe that? Read the section on pointer arithmetic in the
C99 standard.
(Unless this comes back to being Boost related, we really ought to move this
discussion out of here.)
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden]> (847) 691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk