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 10720 articles. 0 followers. allnor (8507) is leader. Post Follow

2 Replies
427 Views

Similar Articles

[PageSpeed] 31
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
Reply:
Similar artilces about - isolating boost variant from the rest of boost:

[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....

galvanic isolation of sensors
Hi all, So, I want to put 10 pH/ORP probes onto a microcontroller, with each probe being galvanically isolated from its peers so that the measurements of different probes aren't interfering with each other. Being more of a digital than an analogue guy, I'm not really sure how to proceed... Another requirement is that it's a small solution - there's not much space to play with here, about 0.5" x 1.5" per probe PCB... And of course, the cheaper the better, given that I want 10 of them! One chip I found to do the isolation is the adum5241 (http:// www.analog.com/en/in...

Problem when installing Boost.Python
This is a multi-part message in MIME format. ------_=_NextPart_001_01CEBA9C.1B8625C1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, All I'm not sure if am asking in the right place, but since this is Python related, I'd like to try it out. My setup is Windows7 64-bit, Python 2.7 64bit, Boost 1.54, Visual Studio 2012 Express Version 64bit. I am a beginner of Python, and am trying to bridge Python and C++. Thus I download the Boost library. I followed the instruction here: http://www.boost.org/doc/libs...

boost::MultiIndex help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm using boost multi index for the first time. I've managed to populate the container with my data & now I am trying to get the non-unique ordered index to work. Does anyone have a source example (not from the boost.multiindex tutorial please) used to get a list, set, whatever, of tuples from such a search on such an index? Thanks, Evan Carew -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDtDRCpxCQXwV2bJARAiBuAKCIxIcgHh0YVcSuCXkXDFaOuLYiugCgtU...

isolate vlans from each other
cisco 2651XM router IOS: c2600-adventerprisek9-mz.124-15.T8.bin I have a vlan1 on 172.16.0.x and a vlan192 on 192.168.0.x. Both vlans are routed through Dialer0 so they can surf the internet. At the moment both these vlans can ping each other. I want to isolate vlan1 and valn192 from each other so neither network can ping the other but I still want them both to access the internet. How can I do this? Here is a small section of my current config Thanks for any advice. interface Vlan1 ip address 172.16.1.30 255.255.0.0 ip nat inside ip virtual-reassembly ! interface Vlan192 ip address 192....

using boost::pool_allocator<T> ?
Hi, I've experimenting with using boost::pool_allocator with std::vector and gcc (4.1)., and I am having problems with segmentation violations. Below I give a simple example of one way I am getting this // Include files #include <cmath> #include <iostream> #include <vector> #include <map> #include "boost/pool/pool_alloc.hpp" //--- Example main program int main ( int argc, char** argv ) { typedef std::vector< int, boost::pool_allocator<int> > Vector; typedef std::map< int, Vector > Map; Vector v; v.push_back(10); Map map; ...

Variant record limitation
I see that I can't do what I'd like to with a variant record. What should I be doing? Here's an example: type my_object(X : size_type) is record name : string(1..80); case X is when small => Y : small_type; -- line 20 when medium => Y : medium_type; -- line 21 when large => Y: large_type; -- line 22 end case; end record; The errors are: line 21 'Y' conflicts with declaration at line 20 line 22 'Y' conflicts with declaration at line...