I'm using boost::any until boost::variant is out.

My question is about the syntax of boost::any_cast.  Why does the follow
not work:
  return *boost::any_cast< double* >(
    &_attributeMap[ "securitized-balance" ] ) ;

while the following does:
  return *boost::any_cast< double >(
    &_attributeMap[ "securitized-balance" ] ) ;

IMHO, it would be more consistent with the existing casting operators
for the user to have to explicitly say the full type (eg double* )
rather than the casting operator implicitly knowing the type.

Thanks,
Noel
-- 
NOTICE: If received in error, please destroy and notify sender.  Sender
does not waive confidentiality or privilege, and use is prohibited.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to