Subscribed unsubscribe Subscribe Subscribe

すごくどうでもいい事だけど

Boost.Variantのドキュメントにある以下の説明は穏やかにBoost.Anyをdisっているように見えなくもない。つか Boost.Any の swap で no-throw が保証されてるのはポインタ同士の交換だからで、それなら別に Boost.Variant でポインタを束ねてもいいし…。

Of course, Boost.Any has several advantages over Boost.Variant, such as:

* Boost.Any, as its name implies, allows virtually any type for its content, providing great flexibility.
* Boost.Any provides the no-throw guarantee of exception safety for its swap operation.
* Boost.Any makes little use of template metaprogramming techniques (avoiding potentially hard-to-read error messages and significant compile-time processor and memory demands).

Boost.Variant vs Boost.Any