Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-08-27 14:15:54


----- Original Message -----
From: Dave <dave_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, August 27, 2001 3:34 PM
Subject: Re: [boost] "Strict" type traits

> Fernando Cacciola wrote:
> >
> > Currently, a call to has_trivial_constructor() (for example) might
return
> > false, ... you don't know whether the answer is actually
> > meaningful or it means 'I don't know'.
>
> Ah, I see.
> If the answer can be yes, no, or "unknown", then by definition
> it is not a predicate.
>
I suggest that you read Vesa's post again.
He was refering to problem in the type traits library.

This problem can be generalized as follows:
When you define a predicate (a logically valid predicate whose only fasible
output is true/false), AS AN INTERFACE -that is, without any specific
implementation- it might ocurr that the predicate isn't implemented for a
particular case, therefore some method is required to let the user know that
such predicate actually isn't implemented. He suggested some sensible
solutions, one of which is to allow cross-checking of contradictory answers
as a way to realize that the predicate isn't implemented.

The problem has NOTHING to do with the predicates themselves (which are
logically correct), but with the lack of proper signaling of missing
implementations.

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk