|
Boost Users :
|
- Next message: Eric Niebler: "Re: [Boost-users] [proto, fusion] Segfault in for_each"
- Previous message: David A. Greene: "[Boost-users] [proto, fusion] Segfault in for_each"
- In reply to: Nicolas Lelong: "[Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
- Next in thread: Steven Watanabe: "Re: [Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
- Reply: Steven Watanabe: "Re: [Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
- Reply: Larry Evans: "Re: [Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
Nicolas Lelong wrote:
>does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?
>...
>Anyone could tell me what is the rationale behind having a special variant for boost::gil ? performance ? Wouldn't it be easier to replace it by boost::variant ?
Hi Nicolas,
It was not possible to assign and copy construct between two gil::variants containing different subsets of types.
I just submitted and update that makes this possible so you should sync to trunk.
As for why we dont use boost::variant, I recall that I was able to switch to boost::variant at some point (it wasnt that hard) but there was a severe compile time penalty.
Another reason is that gil::variant takes a single type, which is an MPL random access container of types, whereas boost::variant takes the types directly. The former makes a lot of operations easier.
Lubomir
- Next message: Eric Niebler: "Re: [Boost-users] [proto, fusion] Segfault in for_each"
- Previous message: David A. Greene: "[Boost-users] [proto, fusion] Segfault in for_each"
- In reply to: Nicolas Lelong: "[Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
- Next in thread: Steven Watanabe: "Re: [Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
- Reply: Steven Watanabe: "Re: [Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
- Reply: Larry Evans: "Re: [Boost-users] [GIL] does gil::variant<mpl::vector3<A, B, C> > constructor accept instances of gil::variant<mpl::vector2<A, B> > ?"
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net