Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

isolating boost variant from the rest of boost

3 views
Skip to first unread message

Thant Tessman

unread,
May 27, 2007, 4:41:27 PM5/27/07
to

I've written some code that takes advantage of the Boost Variant
library. This code is eventually intended for platforms for which it may
be inappropriate or even impossible to install the entire Boost Library
Suite. Consequently, I might have to come up with a standalone version
of the variant library. Can someone point me at such a library? Or
should I try to tease the variant stuff out of the rest of boost? (The
variant header seems to pull in a large number of other headers.) Or
should I just go ahead and implement my own version?

Much obliged for any advice,

-thant

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Bjørn Roald

unread,
May 27, 2007, 9:25:12 PM5/27/07
to
Thant Tessman wrote:
>
> I've written some code that takes advantage of the Boost Variant
> library. This code is eventually intended for platforms for which it may
> be inappropriate or even impossible to install the entire Boost Library
> Suite. Consequently, I might have to come up with a standalone version
> of the variant library. Can someone point me at such a library? Or
> should I try to tease the variant stuff out of the rest of boost?

Have not tried with variant, but the bcp tool may help. You find it in
the tools directory of boost.

http://www.boost.org/tools/bcp/bcp.html

> (The
> variant header seems to pull in a large number of other headers.) Or
> should I just go ahead and implement my own version?

The bcp tool will at least reduce your code down to the variant lib and
what variant depend on. Then you can assess if you want to go further
from there.

--
regards,
Bjørn

peter koch larsen

unread,
May 27, 2007, 9:26:29 PM5/27/07
to
On 27 Maj, 22:41, Thant Tessman <a...@standarddeviance.com> wrote:
> I've written some code that takes advantage of the Boost Variant
> library. This code is eventually intended for platforms for which it may
> be inappropriate or even impossible to install the entire Boost Library
> Suite. Consequently, I might have to come up with a standalone version
> of the variant library. Can someone point me at such a library? Or
> should I try to tease the variant stuff out of the rest of boost? (The
> variant header seems to pull in a large number of other headers.) Or
> should I just go ahead and implement my own version?

My recommendation would be to give users an option. It would be silly
to build your own version, if that would require users already using
boost to stand on their head in order to avoid ODR-problems etc. I
hope that wont pose to many problems to you.

/Peter

0 new messages