
Nicola Musatti wrote:
Edward Diener <eldiener <at> tropicsoft.com> writes:
While I agree consideration of null handling using optional makes sense, there has been some controversy in the past about the optional interface...so beaware that this approach may bring criticism from some people. What better way is there of specifying a database null value being
Jeff Garland wrote: [...] passed to or returned from a column of a particular row other than to use boost::optional is the key question. I believe the criticism of optional in the past regards using it with optional references, but when passing and returning database null values, only values would normally be used.
I think Jeff refers to objections that have been raised about using pointer-like syntax for things that are not pointers.
I have to second everyone who favors boost::optional. It's IMO absolutely the best way of handling null-allowed fields. Yuval