isolating boost variant from the rest of boost

  • Permalink
  • submit to reddit
  • Email
  • Follow


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! ]

0
Reply Thant 5/27/2007 1:41:27 PM

See related articles to this posting

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

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

0
Reply ISO 5/27/2007 6:25:12 PM

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


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

0
Reply peter 5/27/2007 6:26:29 PM
comp.lang.c++.moderated 10589 articles. 6 followers. Post

2 Replies
231 Views

Similar Articles

[PageSpeed] 46

  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

The boost.variant library and boost::make_recursive_variant
We have this code: typedef boost::make_recursive_variant< int , std::vector< boost::recursive_variant_ > >::type int_tree_t; Use of the resultant variant type is as expected: std::vector< int_tree_t > subresult; subresult.push_back(3); subresult.push_back(5); std::vector< int_tree_t > result; result.push_back(1); result.push_back(subresult); result.push_back(7); int_tree_t var(result); According to documentation in library of boost.variant, a variable var it's ( 1 ( 3 5 ) 7 ). Queastion:Who do it print in language C++ by next of std::cout? Thank...

boost.variant and its efficiency
What do your think about the efficiency of boost.variant on account of a memory and a speed of its action in this boost library. Advice in thanks. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] On Sep 29, 1:25 am, Miroslaw Makowiecki <tyta...@poczta.onet.pl> wrote: > What do your think about the efficiency of boost.variant on account of a > memory and a speed of its action in this boost library. > Advice in thanks. First, boost.variant is move aware, and will try to apply move semant...

Variant proposal, boost::any
I was wondering if there are any existing proposal to integrate a variant type ala boost::any into the standard library? Christopher Diggins http://www.cdiggins.com --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ] <cdiggins@videotron.ca> wrote in message news:1123540817.281676.201160@f14g2000cwb.googlegroups.com... > I...

boost::variant Binary visitation
When i compile this code in VC71 or VC80 i get the following errors: The code is copy/paste from the boost.org tutorial. Please help! error C2039: 'begin' : is not a member of 'boost::variant<T0_,T1>' with [ T0_=int, T1=std::string ] Test2.cpp(47): error C2039: 'end' : is not a member of 'boost::variant<T0_,T1>' with [ T0_=int, T1=std::string ] Test2.cpp(47): error C2039: 'begin' : is not a member of 'boost::variant<T0_,T1>' ...

[C++]boost.variant and its optymalization
How do we think about optymalization boost.variant on account of a memory and a speed of action in its boost library in C++ language. Advice in thanks. miroslaw.makowiecki@gmail.com wrote: > How do we think about optymalization boost.variant on account of a > memory and a speed of action in its boost library in C++ language. > Advice in thanks. *I* don't. Not that I couldn't. I just don't. Why do you ask? Have you found it to be non-optymalized in some way? V -- Please remove capital 'A's when replying by e-mail I do not respond to top-posted replies, plea...

Zombies Boost New Sober Variant
Paul F. Roberts - eWEEKTue Nov 22, 1:23 PM ET Anti-virus and e-mail security companies warned Internet users Tuesday about a new variant of the Sober worm that was flooding e-mail servers around the world, with help from zombie machines infected by earlier editions of the same worm. Sober.AG is the latest in a long line of mass e-mail worms. It appeared Monday, after machines infected with older variants began spamming out the new version in a massive e-mail flood. The e-mail messages use a variety of subterfuges to trick recipients into opening the virus attachment, including...

boost variant template type argument count
I'm using an instance of the boost::variant type as the token value of a non-trivial grammar. The type list is 24 items long. Apparently there is a type list limit of 20 items. Is this correct? Is this just a matter of building the cases, or is it dictated by some platform limit on template type arguments? (Is it actually dictated by the apply_visitor template?) Thanks for any info. (I briefly wandered around the boost headers, but their organization is not transparent to the uninitiated.) -thant -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang....

Design of isolated full bridge boost converter using multiwinding transformer block in simpowersystems blockset
I am facing a problem in designing the isolated full bridge boost converter using the multiwinding transformer block in simulink's simpowersystems blockset. I have used this transformer with a single tap on the upper right side winding and have fixed the duty cycle and step up ratio as per the texts available, however I am not able to get a boost in the output voltage. Can anyone suggest an alternative to the multiwinding transformer block "Smriti" wrote in message <iml8l4$s8d$1@fred.mathworks.com>... > I am facing a problem in designing the isolated full bridge boos...

Any Boost Experts out there for Boost.Regex?
Hello All, I am a newbie to the Boost library and I have a question about a simple function. All I would like to do is to create a simple function that can test strings using regular expressions. I've written this function which appears to work on the first pass and then fails on the second with the following message. Unhandle exeption in Credit Card Example.exe (KERNEL32.DLL) 0x(Some address): Microsoft C++ Exception. My function is as follows.... bool TestStr (std::string szExpr, std::string szSearch) { bool bResult=false; boost::regex *cExpr = new boost::regex(szExpr); bResu...