#### isolating boost variant from the rest of boost

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
Thant
5/27/2007 1:41:27 PM
comp.lang.c++.moderated 10708 articles. 0 followers. allnor (8507) is leader.

2 Replies
388 Views

Similar Articles

[PageSpeed] 6
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
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
peter
5/27/2007 6:26:29 PM
Similar Artilces:

[SOLUTION] Chess Variants (I) (#35) #2
My hacked-together solution, based on Bangkok (http://bangkok.rubyforge.org), is at http://www.io.com/~jimm/rubyquiz/quiz35/. I need to improve the board drawing routine and make the input more tolerant. Input for each move must be of the form used for chess game files (e.g., "f4", "Nf6", "Nxc6"). Jim -- Jim Menard, jimm@io.com, http://www.io.com/~jimm "An operating system is a collection of things that don't fit into a language. There shouldn't be one." -- Dan Ingalls On Jun 15, 2005, at 8:54 AM, Jim Menard wrote: > My hacked-to...

isolate
hi friends, please, i need code for isolate object from background. thanks In article <g3lmdu$r2h$1@fred.mathworks.com>, huda nawaf <halmamory@yahoo.com> wrote: >please, i need code for isolate object from background. You already have an existing thread on this topic, "object and background", from June 14th. The answer you were given there by ImageAnalyst appeared accurate to me, "Too many ways to list. An entire industry is based on this." To which I would add, Your problem is too vague to be answerable. You have not defined what the characteri...

is it possible to boost USB Bus Power in Keyboard?
I have a Power Mac G5 running Tiger. I'd like to connect my USB headset and my touchpad to the two USB ports on the keyboard. The headphones only work intermittently. Is there a way to boost bus power? ________________________________ USB Bus: Host Controller Location: Built In USB Host Controller Driver: AppleUSBOHCI PCI Device ID: 0x0035 PCI Revision ID: 0x0043 PCI Vendor ID: 0x1033 Bus Number: 0x0b Hub in Apple Pro Keyboard: Version: 4.10 Bus Power (mA): 500 Speed: Up to 12 Mb/sec Manufacturer: Mitsumi Electric Product ID: 0x1003 Vendor ID: 0x05ac (Appl...

Alien Isolation
Reviews are popping up now, and they're not entirely positive. I have read three reviews now where the conclusion is that the game is just too frustrating and that the AI of the Xenomorph 'cheats' to find you, wherever you hide. The word 'tedious' or similar has cropped up a few times. Apparently the game looks gorgeous though. This game will probably piss me right off, very quickly. I'm not buying it now. Seriously. Honest. -- Rob On Sat, 04 Oct 2014 19:56:34 +0100, Mr Rob <noemailformethx@jsjsaiiowppw.com> wrote: I forgot t...

Job for Boost filtered iterators ???
Hi I have a POD struct in a vector and there are 4 counts I am interested in. It works out that pair of iterators mark the beginning and end of "Channel" events and that one of members of the struct, bool indicates if this channel event has "AI". It is also possible that several Channel "events" (call it it a segment) may be merged in the final output (from adjacent events in the vector) and if that is so, "AI" is present in a merged segment, if there is any AI in the separate events. Given struct ChannelData { : bool AIPresent;...

removal of isolated pixels
i have an image with many isolated one or two pixel regions which is acting as a noise in my image ... suggest any filter which can help in removing this noise... On May 9, 1:10=A0am, arpit singhal <arpitsinghal2...@gmail.com> wrote: > i have an image with many isolated one or two pixel regions which is > acting as a noise in my image ... suggest any filter which can help in > removing this noise... --------------------------------------------- Try a median filter, medfilt2(). You can threshold the difference between the median and the original and just replace those pixels i...

boost::lambda start learning
Hi I start learning boost.Today I tried to use boost::lambda but failed to compile very simple example. 2 hours of googling gave nothing. Can anybody help me? using namespace boost::lambda; typedef std::map<int,std::string_t> type; type test; test[0] = (_T("1")); test[1] = (_T("2")); test[2] = (_T("3")); std::vector<std::string_t> test_vector; std::for_each(test.begin(),test.end(), test_vector.push_back(bind(&type::value_type::second,_1)) ); -----------------------------------------------------------------...

Solve / Reduce isolating results.
Dear All, Given the enclosed code - see below. Please could someone help me setup the code to Solve / Reduce for these 2 missing values only required {SQ1 -> 5292, XX -> 0.25} (I don't want multiple results.) I want positive numbers & NOT Complex.. Many thanks for your help & attention, really appreciated. Please see below. Best regards, Lea... .................................................................... Clear[SQ1] Clear[XX] Solve[{(1/6)*((SQ1*196)*2)^3 - (1/6)*((((2.75 + XX)*((3.75 + XX)*21^2))*100)*2)^3 == 1.2...

Microsoft's Wireless Aspirations Get A Boost
Arik Hesseldahl, 09.15.03, Forbes.com Microsoft's aspirations to produce a wireless phone that runs its Windows Mobile software for handheld computing are finally coming to life, thanks to a partnership with Motorola -- rumors of which we reported on in July. The world's biggest software concern and the world's second-largest manufacturer of mobile phones behind Nokia announced the tie-up today. They also introduced the first Motorola-branded phone to use Microsoft's software, the MPx200, which will go on sale first in the U.K. with French wireless carrier Orange. ...

Problems with Restful resources with the same name
Hi all, I am trying to setup an application that has a management section and a client section with URLs as follows: http://mysite.com/manage/outlines/1 - Management section with outline #1 http://mysite.com/outlines/1 - Client section with outline #1 Both refer to different controllers as follows: app/controllers/outline_controller.rb - Management controller app/controllers/clients/outline_controller.rb - Client controller Yep this is a bit confusing, but this is the only controller for the client section, where as the management section has about six. For my routes I have the following...

NBC Sees Last-Minute Olympic Profit Boost
LOS ANGELES, Aug 26 (Reuters) - NBC Universal, riding high on a Summer Olympics that appears on track to set a record for viewership, will beat early forecasts and turn a profit of $60 million to$70 million for its coverage of the Games from Athens, an NBC executive said on Thursday. With ratings running ahead of the 2000 Olympics in Sydney, executives said the network was able to release some advertising inventory that had been held back in case of a "make goods" situation, in which networks offer free time to advertisers if they fall short of ratings commitments. The...

Isolated server
I have a server that is behind a firewall and is only used to run apache2... When a user other than ROOT tries to log on locally, there is a significant time between putting in the user name and the request for password... Why is this? There can be NO outbound initiated traffic from this server.. What services can I delete? RPC? NIS? DHCP? DNS? PRINTER-SERVER? How can I use svccfg to add the apache2 to the startup lists? THanks Carl OK the first problem is solved because the users home directory was listed as /home/user vice /export/home/user, which caused the delay and caused the infamou...

Boost and Zip support
Hi, I program for a long pause C + + and would like to compress strings and files. I need to compress a string and want to know the number of compressed bytes, the same with files. I use with the boost "boost/iostreams/filter/gzip.hpp" and would still like to extend the device BZIP2 and 7Zip. Can someone please help me, perhaps with the GZIP Boost? Currently, I have const long double ncd::compress ( const std::string p_str ) const { std::stringstream l_stream; l_stream << p_str; return length(compress(l_stream)); } Thanks Phil ...

Copying/Isolating PDF Form Fields using Acrobat JavaScript
Does anyone know how to either (1) copy just the form fields from one PDF file to another using Adobe Acrobat JavaScript (how do you read all the fields?), and/or (2) delete all the text, line, and graphic objects from a PDF file leaving only the form fields, again using Acrobat JavaScript? Just activate the form tool and use Copy and Paste. Or Use the Document | Replace Pages command from the menu. Paul Pontinen wrote: > Does anyone know how to either (1) copy just the form fields from one > PDF file to another using Adobe Acrobat JavaScript (how do you read > all the fields?), ...

std::vector<boost::xpressive::sregex> fails to compile using gcc
Hi I'm trying to use a vector of Boost Xpressive sregex objects. VS2005 compiles my code successfully, but gcc 3.4 and 4.1 fail with: <path>/include/c++/3.4.5/bits/stl_construct.h: In function void std::__destroy_aux(_ForwardIterator, _ForwardIterator, __false_type) [with _ForwardIterator = boost::xpressive::sregex*]': <path>/include/c++/3.4.5/bits/stl_construct.h:152: instantiated from void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = boost::xpressive::sregex*]' <path>/include/c++/3.4.5/bits/stl_vector.h:256: insta...

TCP variants on BSD
Hello, I'm looking for an OS (unix) on which I can run the following TCP variants: - TCP-Tahoe - TCP-Reno - TCP-NewReno - TCP-SACK - TCP-Vegas - TCP-Westwood Is any of the xBSDs is able to run all of a subset of them. Or is there one I can use after installing some available package? Your help is much appreciated. Thanks, Khaled Khaled <nospam.ksubs@free.fr> wrote: > I'm looking for an OS (unix) on which I can run the following TCP > variants: > - TCP-Tahoe > - TCP-Reno > - TCP-NewReno > - TCP-SACK > - TCP-Vegas > - TCP-Westwood > > Is any of ...

Bill Nye: Christian shitboxes hold the rest of us back
http://www.youtube.com/watch?v=gHbYJfwFgOU Bill Nye, Science Guy covers CXhristaniuc rightard denial of science, notes that these shitting rightards hold the rest of us back. ...

help with boost::spirit
Hi Group, I'm starting to learn to use boost::spirit but I am having a problem understanding the behaviour of a simple example. Any suggestions and corrections would be appreciated. Just as a test, I'd like to parse this string: "SET albert fred 123" with the "SET" being identified as a keyword, and the "123" identified as an integer, and "albert" and "fred" identified as names. To my surprise, the output from the code below is: SET NAME='albert fred 123' rather than (what *I* thought I'd get) SET NAME='albert' N...

Electrically isolating network hardware from dehumidifier: isolation transformer or line conditioner?
Hi. I have a dehumidifier plugged into the same electrical outlet as my DSL router and wireless router. I want to electrically isolate the DSL and wireless units from the on/off switching of the dehumidifier. The dehumidifier has a big electric motor inside of it, and I've read that the on/off action of that motor kicks electrical garbage backwards into the line and can affect my electronics. I've narrowed my choices down to either an isolation transformer: http://www.tripplite.com/products/product.cfm?productID=227 or a line conditioner: http://www.tripplite.com/products/product....

How to select extra black Type 1 font variant?
I have just completed my first Type 1 font installation---the Optima family. To test my installation, I used the following document: \documentclass{minimal} \begin{document} \usefont{T1}{pop}{m}{n}This is Optima\par \usefont{T1}{pop}{m}{it}This is Optima-Italic\par \usefont{T1}{pop}{m}{sl}This is Optima-Oblique\par \usefont{T1}{pop}{mb}{n}This is Optima-Medium\par \usefont{T1}{pop}{mb}{it}This is Optima-MediumItalic\par \usefont{T1}{pop}{db}{n}This is Optima-DemiBold\par \usefont{T1}{pop}{db}{it}This is Optima-DemiBoldItalic\par \usefont{T1}{pop}{b}{n}This is Optima-Bold\par \usefont{T1}{pop}...

libsigc++ vs. boost::signals
Hello! I am very interesting what is present comparision between libsigc++ version 2.0 and boost::signals in boost 1.33. >From documentation I could notice that they are quite similar (with respect to the functionality and API). On Internet I have found that boost::signals have problems with cooperation with boost::lambda and boost::functional, but in that information there was not included the number of the boost version. Is that true for boost 1.33? Is in libsigc++ possible to connect, a group of functions to one signal like in boost::signals? In examples for libsigc++ 2.0 there is no...

[News] GNu/Linux Sub-notebooks to Get Boost from Moorestown
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Intel Sets Launch of Moorestown, New Moblin Linux at 2010 ,----[ Quote ] | The launch of Moorestown will be accompanied by a new version of Moblin, a | Linux-based operating system (OS) that Intel created for small devices. `---- http://www.pcworld.com/article/162771/intel_sets_launch_of_moorestown_new_moblin_linux_at_2010.html Why Netbooks Are an Enduring Hardware Category ,----[ Quote ] | The sizes of the displays on netbooks have crept up from the original 7-inch | mini screens to healthy 10-inch displays, and yet the designs have remain...

Isolating cases
Hi All: In the following dataset, I need to isolate all those id's that have moved from y=2 to y=10 (without going thro' the y=3 and y=9). If I use the "if y not in(3,9)" it gives me all id's because all of them have gone to either 2 or 10. What I need are those id's that did NOT go thro' 3 and 9 before hitting 10. data x; input id $2. x$3. y 2.; cards; AB35201 AB35302 AB35303 AB35209 AB35510 AC35201 AC35302 AC35510 BC35001 BC35002 BC35503 BC35509 BC35510 BA34401 BA34402 BA34410 ; run; proc print; run; /* Expected outcome */ AC352...

Boost Your Car's Gas Mileage 27%+.....corentine
--206D.F2.86__00 Content-Type: text/plain; Content-Transfer-Encoding: quoted-printable FUEL SAVER PRO This revolutionary device Boosts Gas Mileage 27%+ by helping fuel burn bet= ter using three patented processes from General Motors. www.bb4n.org/?axel=3D49 PROVEN TECHNOLOGY A certified U.S. Environmental Protection Agency (EPA) laboratory recently= completed tests on the new Fuel Saver. The results were astounding! Maste= r Service, a subsidiary of Ford Motor Company, also conducted extensive em= issions testing and obtained similar, unheard of results. The achievements= of the Fuel Save...

std::iterator_category vs boost
Hello, I read a lot of complaints about how the standard iterator_category mixes access and traversal. Boost implements its own variant of tags. Helpers like boost::transform_iterator will usually turn any iterator into a simple input iterator if *iter doesn't return an lvalue. This makes it mostly useless to me. Actually functions coded specifically for boost can see it as something more than an input iterator, but not regular functions asking for forward iterators and such. In most code I've seen, we ignore the lvalue requirement and lie by defining iterator_category j...