Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#6364 closed Bugs (fixed)

boost::optional has bad documentation

Reported by: Ben Longbons <b.r.longbons@…> Owned by: Fernando Cacciola
Milestone: To Be Determined Component: optional
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

boost::optional's documentation says that operator unspecified_bool_type is equivalent to (get() != 0), when in fact it is equivalent to (get_ptr() != 0)

Also, since is_initialized() is deprecated, it should indicated to use operator unspecified_bool_type() instead.

Change History (5)

comment:1 by bruno.uy@…, 10 years ago

The reset methods are also deprecated, but the examples in the documentation use them.

comment:2 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: newclosed

(In [82911]) Correct definition of operator unspecified-bool-type. Make reference for is_initialized point to this operator. Fixes #6364.

comment:3 by Bruno Martinez Aguerre <bruno.uy@…>, 10 years ago

Steven, maybe you can also fix the examples?

in reply to:  3 comment:4 by Steven Watanabe, 10 years ago

Replying to Bruno Martinez Aguerre <bruno.uy@…>:

Steven, maybe you can also fix the examples?

Already done. It had it's own ticket: #765

comment:5 by Bruno Martinez Aguerre <bruno.uy@…>, 10 years ago

Great work. Thank you.

Note: See TracTickets for help on using tickets.