Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Can't get boost to work with Berlin


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Apr 19, 2017 6:11 AM Last Post By: Tom Roberts
Tom Roberts

Posts: 102
Registered: 6/21/05
Can't get boost to work with Berlin  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 19, 2017 5:26 AM
I downloaded Boost 1.63 as I was hoping to learn Spirit. Downloaded a spirit example (shown below) and tried to compile. There was 925 warnings and 51 errors. Is 1.63 incompatible with C++ builder 10.1?

// This sample demontrates a parser for a comma separated list of numbers.
// No semantic actions.
//
// [ JDG May 10, 2002 ] spirit1
// [ JDG March 24, 2007 ] spirit2
// [ JDG May 12, 2015 ] spirit X3
//
///////////////////////////////////////////////////////////////////////////////

#include <boost/config/warning_disable.hpp>
#include <boost/spirit/home/x3.hpp>

#include <iostream>
#include <string>
#include <vector>

namespace client
{
namespace x3 = boost::spirit::x3;
namespace ascii = boost::spirit::x3::ascii;

///////////////////////////////////////////////////////////////////////////
// Our number list parser
///////////////////////////////////////////////////////////////////////////
template <typename Iterator>
bool parse_numbers(Iterator first, Iterator last)
{
using x3::double_;
using x3::phrase_parse;
using ascii::space;

bool r = phrase_parse(
first, // Start Iterator
last, // End Iterator
double_ >> *(',' >> double_), // The Parser
space // The Skip-Parser
);
if (first != last) // fail if we did not get a full match
return false;
return r;
}
}

////////////////////////////////////////////////////////////////////////////
// Main program
////////////////////////////////////////////////////////////////////////////
int
main()
{
std::cout << "/////////////////////////////////////////////////////////\n\n";
std::cout << "\t\tA comma separated list parser for Spirit...\n\n";
std::cout << "/////////////////////////////////////////////////////////\n\n";

std::cout << "Give me a comma separated list of numbers.\n";
std::cout << "Type [q or Q] to quit\n\n";

std::string str;
while (getline(std::cin, str))
{
if (str.empty() || str[0] == 'q' || str[0] == 'Q')
break;

if (client::parse_numbers(str.begin(), str.end()))
{
std::cout << "-------------------------\n";
std::cout << "Parsing succeeded\n";
std::cout << str << " Parses OK: " << std::endl;
}
else
{
std::cout << "-------------------------\n";
std::cout << "Parsing failed\n";
std::cout << "-------------------------\n";
}
}

std::cout << "Bye... :-) \n\n";
return 0;
}

First few error messages
[bcc32 Error] integral_constant.hpp(99): E2316 'value' is not a member of 'integral_constant<bool,val>'
[bcc32 Error] remove_cv.hpp(31): E2430 Number of template parameters does not match in redeclaration of 'remove_cv<T const[]>'
[bcc32 Error] remove_cv.hpp(31): E2428 Templates must be classes or functions
[bcc32 Error] remove_cv.hpp(32): E2430 Number of template parameters does not match in redeclaration of 'remove_cv<T const volatile[]>'
[bcc32 Error] remove_cv.hpp(32): E2428 Templates must be classes or functions

Edited by: Tom Roberts on Apr 19, 2017 5:36 AM

Greg Reese

Posts: 100
Registered: 7/15/05
Re: Can't get boost to work with Berlin  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 19, 2017 5:39 AM   in response to: Tom Roberts in response to: Tom Roberts
Tom Roberts wrote:
I downloaded Boost 1.63 as I was hoping to learn Spirit. Downloaded a spirit example (shown below) and tried to compile. There was 925 warnings and 51 errors. Is 1.63 incompatible with C++ builder 10.1?

Boost 1.63 is not supported. You can see the version of Boost that the various compilers in 10.2 Tokyo support at

http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Boost

I believe the support is the same in 10.1 Berlin.
Greg Reese
Tom Roberts

Posts: 102
Registered: 6/21/05
Re: Can't get boost to work with Berlin  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 19, 2017 6:11 AM   in response to: Greg Reese in response to: Greg Reese
Greg Reese wrote:
Tom Roberts wrote:
I downloaded Boost 1.63 as I was hoping to learn Spirit. Downloaded a spirit example (shown below) and tried to compile. There was 925 warnings and 51 errors. Is 1.63 incompatible with C++ builder 10.1?

Boost 1.63 is not supported. You can see the version of Boost that the various compilers in 10.2 Tokyo support at

http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Boost

I believe the support is the same in 10.1 Berlin.
Greg Reese

Thanks Greg.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02