S
Saqib Ali
I'm using Solaris: 5.10
My Compiler is: /opt/solstudio12.2/bin/CC
My stupidly simple C++ sample that uses Boost.
#include <boost/algorithm/string.hpp> //
Line 1
#include <boost/algorithm/string/trim.hpp> //Line
2
#include <boost/algorithm/string/split.hpp> //Line
3
//
Line 4
using namespace
std; //Line 5
using namespace
boost; //Line 6
int
main(void) //
Line 9
{ //
Line 10
std::string str1(" hello world!
"); //Line 11
string tokens,
allLines; //Line 12
to_upper(str1); // str1 == " HELLO WORLD! " //Line 13
trim(str1); // str1 == "HELLO WORLD!" //Line
14
split(tokens, allLines,
is_any_of(":")); //Line 15
//
Line 16
return
-1; //
Line 17
}
But no matter what I do, I keep getting the same compilation error.
(See below).
Can anyone explain how to make it go away? Does it work on your
systems?
% /opt/solstudio12.2/bin/CC -c myTest.C -I /vobs/zodiac/ADAT_base/
BOOST/include -o myTest.o
"/vobs/zodiac/ADAT_base/BOOST/include/boost/range/distance.hpp", line
29: Error: Could not find a match for
std::distance<std::_ForwardIterator, std::_Distance>(const char*,
const char*) needed in boost::distance<boost::iterator_range<const
char*>>(const boost::iterator_range<const char*>&).
"/vobs/zodiac/ADAT_base/BOOST/include/boost/algorithm/string/detail/
classification.hpp", line 85: Where: While instantiating
"boost::distance<boost::iterator_range<const char*>>(const
boost::iterator_range<const char*>&)".
"/vobs/zodiac/ADAT_base/BOOST/include/boost/algorithm/string/detail/
classification.hpp", line 85: Where: Instantiated from
boost::algorithm::detail::is_any_ofF<char>::is_any_ofF<boost::iterator_range<const
char*>>(const boost::iterator_range<const char*>&).
"/vobs/zodiac/ADAT_base/BOOST/include/boost/algorithm/string/
classification.hpp", line 207: Where: Instantiated from
boost::algorithm::is_any_of<char[2]>(const char(&)[2]).
"myTest.C", line 15: Where: Instantiated from non-template code.
1 Error(s) detected.
My Compiler is: /opt/solstudio12.2/bin/CC
My stupidly simple C++ sample that uses Boost.
#include <boost/algorithm/string.hpp> //
Line 1
#include <boost/algorithm/string/trim.hpp> //Line
2
#include <boost/algorithm/string/split.hpp> //Line
3
//
Line 4
using namespace
std; //Line 5
using namespace
boost; //Line 6
int
main(void) //
Line 9
{ //
Line 10
std::string str1(" hello world!
"); //Line 11
string tokens,
allLines; //Line 12
to_upper(str1); // str1 == " HELLO WORLD! " //Line 13
trim(str1); // str1 == "HELLO WORLD!" //Line
14
split(tokens, allLines,
is_any_of(":")); //Line 15
//
Line 16
return
-1; //
Line 17
}
But no matter what I do, I keep getting the same compilation error.
(See below).
Can anyone explain how to make it go away? Does it work on your
systems?
% /opt/solstudio12.2/bin/CC -c myTest.C -I /vobs/zodiac/ADAT_base/
BOOST/include -o myTest.o
"/vobs/zodiac/ADAT_base/BOOST/include/boost/range/distance.hpp", line
29: Error: Could not find a match for
std::distance<std::_ForwardIterator, std::_Distance>(const char*,
const char*) needed in boost::distance<boost::iterator_range<const
char*>>(const boost::iterator_range<const char*>&).
"/vobs/zodiac/ADAT_base/BOOST/include/boost/algorithm/string/detail/
classification.hpp", line 85: Where: While instantiating
"boost::distance<boost::iterator_range<const char*>>(const
boost::iterator_range<const char*>&)".
"/vobs/zodiac/ADAT_base/BOOST/include/boost/algorithm/string/detail/
classification.hpp", line 85: Where: Instantiated from
boost::algorithm::detail::is_any_ofF<char>::is_any_ofF<boost::iterator_range<const
char*>>(const boost::iterator_range<const char*>&).
"/vobs/zodiac/ADAT_base/BOOST/include/boost/algorithm/string/
classification.hpp", line 207: Where: Instantiated from
boost::algorithm::is_any_of<char[2]>(const char(&)[2]).
"myTest.C", line 15: Where: Instantiated from non-template code.
1 Error(s) detected.