Opened 11 years ago
Closed 10 years ago
#5814 closed Bugs (invalid)
Problem in boost::any documentation
Reported by: | ASIRINeiluj | Owned by: | nasonov |
---|---|---|---|
Milestone: | To Be Determined | Component: | any |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: |
Description
At http://www.boost.org/doc/libs/1_47_0/doc/html/any/s02.html it seems that the examples functions is_char_ptr & is_string are exchanged.
any_cast<const char *> shouldn't throw but it's in a try block while any_cast<std::string> result should be a string that's not convertible to bool contrary to what's done.
Change History (2)
comment:1 by , 11 years ago
Component: | Documentation → any |
---|---|
Owner: | changed from | to
comment:2 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The documentation is correct.
a) any_cast<const char*>(operand) can throw because operand is passed by reference b) any_cast<std::string>(&operand) returns std::string* because the operand is a pointer.