in Education by
I'm looking to have two versions of BOOST compiled into a project at the same time. Ideally they should be usable along these lines: boost_1_36_0::boost::shared_ptr someClass = new SomeClass(); boost_1_35_0::boost::regex expression("[0-9]", boost_1_35_0::boost::regex_constants::basic); JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I read (well scanned) through the development list discussion. There's no easy solution. To sum up: Wrapping header files in a namespace declaration namespace boost_1_36_0 { #include } namespace boost_1_35_0 { #include } Requires modifying source files Doesn't allow for both versions to be included in the same translation unit, due to the fact that macros do not respect namespaces. Defining boost before including headers #define boost boost_1_36_0 #include #undef boost #define boost boost_1_35_0 #include #undef boost Source files can simply be compiled with -Dboost=boost_1_36_0 Still doesn't address macro conflicts in a single translation unit. Some internal header file inclusions may be messed up, since this sort of thing does happen. #if defined(SOME_CONDITION) # define HEADER #else # define HEADER #endif But it may be easy enough to work around those cases. Modifying the entire boost library to replace namespace boost {..} with namespace boost_1_36_0 {...} and then providing a namespace alias. Replace all BOOST_XYZ macros and their uses with BOOST_1_36_0_XYZ macros. This would likely work if you were willing to put into the effort.

Related questions

0 votes
    I'm looking to have two versions of BOOST compiled into a project at the same time. Ideally they ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    I'm looking to have two versions of BOOST compiled into a project at the same time. Ideally they ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 20, 2022 in Education by JackTerrance
0 votes
    After spending quite some time debugging the issue today, I noticed the boost::iostream::filtering_ostream ... #ifdef HAS_SCOPE { #endif ZlibOstream zlibOstream{oss}; zlibOstream...
asked May 1, 2022 in Education by JackTerrance
0 votes
    When compiling boost filesystem (1_46_1) with Intel 12 Release 4, and Visual Studio 10, I get this error ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    This is a long shot but, having come across a constrain in a form of a qt's signals, slots being ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
0 votes
    This is a long shot but, having come across a constrain in a form of a qt's signals, slots being ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    I can not seem to be able to read from config file multitoken options like I can from command line ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I am a beginner and I just need a bit of help on why I getline is showing an error: this is what I have so far ... payments[MAX_ITEMS]; ifstream iFile; if ( argc != 2 ) { cout...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I am a beginner and I just need a bit of help on why I getline is showing an error: this is what I have so far ... payments[MAX_ITEMS]; ifstream iFile; if ( argc != 2 ) { cout...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I had a program working good (without prompting errors) using references, but I decided to use a pointer-to-pointer array ... that it is there because I have put two flags (cout...
asked Apr 6, 2022 in Education by JackTerrance
0 votes
    I am receiving SOAP requests from a client that uses the Axis 1.4 libraries. The requests have the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 30, 2022 in Education by JackTerrance
0 votes
    I am receiving SOAP requests from a client that uses the Axis 1.4 libraries. The requests have the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 29, 2022 in Education by JackTerrance
0 votes
    (d) Which of the following is used to turn off the word wrapping? (i) valign (ii) wrap (iii) align (iv) nowrap g 00 Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    How would I iterate through these 5 array in a function call? Right now I am just manually iterating through each to form a ... gram address location unsigned char i; for( i= 0; i...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I'd like to ensure my RAII class is always allocated on the stack. How do I prevent a class from ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
...