C++ Logo


Advanced search

Re: [SG14] sizeof_block_metadata function, colony/hive, advice wanted

From: Matt Bentley <mattreecebentley_at_[hidden]>
Date: Fri, 26 Nov 2021 11:31:25 +1300
On 26/11/2021 12:04 am, John McFarlane via SG14 wrote:
> On Thu, 25 Nov 2021 at 08:52, Matt Bentley via SG14
> <sg14_at_[hidden] <mailto:sg14_at_[hidden]>> wrote:
> Hi Paul,
> it'd throw because returning a value matching an inaccurate input value
> might lead to the user expecting that they could reasonably manually
> specify a min/max block capacity in colony/hive that they can't.
> Would it not be a bug for the user to try to do that?

If you're referring to reshape(), it also throws an exception if the
requested block sizes are outside of the implementation's ability. So
it's better to be consistent with that approach, rather than having one
outcome for one function, and a different one for another.

It's reasonable that the user not know what the internal hard limits on
block sizes are, for a given implementation.

Received on 2021-11-25 16:31:30