Re: [boost] [type_erasure] [docs]contrast with boost::any

On 07/23/12 15:37, Larry Evans wrote:
On 07/18/12 00:13, Lorenzo Caminiti wrote:
Hello all,
*** The review of Steven Watanabe's proposed Boost.TypeErasure library begins on July 18, 2012 and ends on July 27, 2012. ***
The page:
http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/...
says:
x is approximately equivalent to a boost::any
however, it doesn't say how te::any differs from boost::any.
The attached shows that a boost::any can change it's type, and, as such, is somewhat like boost::variant. However, te::any, once it's created, cannot change it's type, AFAICT. At least that's what the attached code indicates when compiled with:
#define SHOW_TE_FIXED_TYPE
A simplified version of that code (which doesn't require demangled_type_name), is attached. The attached also suggests that, when multiple placeholders are in the concept, the unary any *requires* a binding argument. This is shown by trying to compile the attachment with: #define SHOW_BINDINGS_MUST_BE_COMPLETE In contrast, the example here: http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/... shows no binding is needed because the only placeholder in the concept is the default, _self. HTH. -regards, Larry
participants (1)
-
Larry Evans