[date_time] build error
I have implemented a class ( lets call it LC2DateTime ) that uses
boost date time in it's implementation. I also have a small test for
this class and it builds nicely and runs properly. However when I
include LC2DateTime.h in my larger project I get this odd build error
that points me to
/usr/include/boost/algorithm/string/detail/finder.hpp as the source of
the error.
------------------
/usr/include/boost/algorithm/string/detail/finder.hpp: In member
function 'boost::iterator_range<Iterator>
boost::algorithm::detail::last_finderF
I should note I'm using boost-1.33.1-4 for fedora core 4.
On 5/11/06, Leif Gruenwoldt
I have implemented a class ( lets call it LC2DateTime ) that uses boost date time in it's implementation. I also have a small test for this class and it builds nicely and runs properly. However when I include LC2DateTime.h in my larger project I get this odd build error that points me to /usr/include/boost/algorithm/string/detail/finder.hpp as the source of the error.
------------------
/usr/include/boost/algorithm/string/detail/finder.hpp: In member function 'boost::iterator_range<Iterator> boost::algorithm::detail::last_finderF
::findit(ForwardIteratorT, ForwardIteratorT, std::forward_iterator_tag) const': /usr/include/boost/algorithm/string/detail/finder.hpp:150: error: expected unqualified-id before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: At global scope: /usr/include/boost/algorithm/string/detail/util.hpp:71: error: expected ',' or '...' before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: In function 'OutputIteratorT boost::algorithm::detail::bounded_copy(InputIteratorT, InputIteratorT)': /usr/include/boost/algorithm/string/detail/util.hpp:76: error: 'DestFirst' was not declared in this scope /usr/include/boost/algorithm/string/detail/util.hpp:77: error: 'DestLast' was not declared in this scope ----------------------
This bug has been bothering me for a while and I actually got my project to build again juggling the placement of of the '#include "LC2DateTime.h" above the other includes in my project. However this problem has reared it's head again and this time no amount of juggling of includes is getting me out of this.
Any thoughts? Is this a problem with the boost libraries or my code?
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
BTW. Here is the function in boost/algorithm that the build error points to.
private:
// forward iterator
template< typename ForwardIteratorT >
iterator_range<ForwardIteratorT>
findit(
ForwardIteratorT Begin,
ForwardIteratorT End,
std::forward_iterator_tag ) const
{
typedef ForwardIteratorT input_iterator_type;
typedef iterator_range<ForwardIteratorT> result_type;
first_finder_type first_finder(
m_Search.begin(), m_Search.end(), m_Comp );
result_type M=first_finder( Begin, End );
result_type Last=M;
<-------------------- THIS LINE HERE
while( M )
{
Last=M;
M=first_finder( end(M), End );
}
return Last;
}
On 5/11/06, Leif Gruenwoldt
I should note I'm using boost-1.33.1-4 for fedora core 4.
On 5/11/06, Leif Gruenwoldt
wrote: I have implemented a class ( lets call it LC2DateTime ) that uses boost date time in it's implementation. I also have a small test for this class and it builds nicely and runs properly. However when I include LC2DateTime.h in my larger project I get this odd build error that points me to /usr/include/boost/algorithm/string/detail/finder.hpp as the source of the error.
------------------
/usr/include/boost/algorithm/string/detail/finder.hpp: In member function 'boost::iterator_range<Iterator> boost::algorithm::detail::last_finderF
::findit(ForwardIteratorT, ForwardIteratorT, std::forward_iterator_tag) const': /usr/include/boost/algorithm/string/detail/finder.hpp:150: error: expected unqualified-id before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: At global scope: /usr/include/boost/algorithm/string/detail/util.hpp:71: error: expected ',' or '...' before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: In function 'OutputIteratorT boost::algorithm::detail::bounded_copy(InputIteratorT, InputIteratorT)': /usr/include/boost/algorithm/string/detail/util.hpp:76: error: 'DestFirst' was not declared in this scope /usr/include/boost/algorithm/string/detail/util.hpp:77: error: 'DestLast' was not declared in this scope ----------------------
This bug has been bothering me for a while and I actually got my project to build again juggling the placement of of the '#include "LC2DateTime.h" above the other includes in my project. However this problem has reared it's head again and this time no amount of juggling of includes is getting me out of this.
Any thoughts? Is this a problem with the boost libraries or my code?
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
Update: I ran my source file that was failing to build through cpp.
The variable 'Last' is being replaced with a 13.
---------------------
template< typename ForwardIteratorT >
iterator_range<ForwardIteratorT>
findit(
ForwardIteratorT Begin,
ForwardIteratorT End,
std::forward_iterator_tag ) const
{
typedef ForwardIteratorT input_iterator_type;
typedef iterator_range<ForwardIteratorT> result_type;
first_finder_type first_finder(
m_Search.begin(), m_Search.end(), m_Comp );
result_type M=first_finder( Begin, End );
result_type 13=M;
while( M )
{
13=M;
M=first_finder( end(M), End );
}
return 13;
}
-----------------------
On 5/11/06, Leif Gruenwoldt
BTW. Here is the function in boost/algorithm that the build error points to.
private: // forward iterator template< typename ForwardIteratorT > iterator_range<ForwardIteratorT> findit( ForwardIteratorT Begin, ForwardIteratorT End, std::forward_iterator_tag ) const { typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type;
first_finder_type first_finder( m_Search.begin(), m_Search.end(), m_Comp );
result_type M=first_finder( Begin, End ); result_type Last=M; <-------------------- THIS LINE HERE
while( M ) { Last=M; M=first_finder( end(M), End ); }
return Last; }
On 5/11/06, Leif Gruenwoldt
wrote: I should note I'm using boost-1.33.1-4 for fedora core 4.
On 5/11/06, Leif Gruenwoldt
wrote: I have implemented a class ( lets call it LC2DateTime ) that uses boost date time in it's implementation. I also have a small test for this class and it builds nicely and runs properly. However when I include LC2DateTime.h in my larger project I get this odd build error that points me to /usr/include/boost/algorithm/string/detail/finder.hpp as the source of the error.
------------------
/usr/include/boost/algorithm/string/detail/finder.hpp: In member function 'boost::iterator_range<Iterator> boost::algorithm::detail::last_finderF
::findit(ForwardIteratorT, ForwardIteratorT, std::forward_iterator_tag) const': /usr/include/boost/algorithm/string/detail/finder.hpp:150: error: expected unqualified-id before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: At global scope: /usr/include/boost/algorithm/string/detail/util.hpp:71: error: expected ',' or '...' before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: In function 'OutputIteratorT boost::algorithm::detail::bounded_copy(InputIteratorT, InputIteratorT)': /usr/include/boost/algorithm/string/detail/util.hpp:76: error: 'DestFirst' was not declared in this scope /usr/include/boost/algorithm/string/detail/util.hpp:77: error: 'DestLast' was not declared in this scope ----------------------
This bug has been bothering me for a while and I actually got my project to build again juggling the placement of of the '#include "LC2DateTime.h" above the other includes in my project. However this problem has reared it's head again and this time no amount of juggling of includes is getting me out of this.
Any thoughts? Is this a problem with the boost libraries or my code?
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
Sorry for all the blabber. Turns out it was my fault obviously. I had
"#define Last 13" in my code.
Thread closed. :)
On 5/11/06, Leif Gruenwoldt
Update: I ran my source file that was failing to build through cpp. The variable 'Last' is being replaced with a 13.
---------------------
template< typename ForwardIteratorT > iterator_range<ForwardIteratorT> findit( ForwardIteratorT Begin, ForwardIteratorT End, std::forward_iterator_tag ) const { typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type;
first_finder_type first_finder( m_Search.begin(), m_Search.end(), m_Comp );
result_type M=first_finder( Begin, End ); result_type 13=M;
while( M ) { 13=M; M=first_finder( end(M), End ); }
return 13; }
-----------------------
On 5/11/06, Leif Gruenwoldt
wrote: BTW. Here is the function in boost/algorithm that the build error points to.
private: // forward iterator template< typename ForwardIteratorT > iterator_range<ForwardIteratorT> findit( ForwardIteratorT Begin, ForwardIteratorT End, std::forward_iterator_tag ) const { typedef ForwardIteratorT input_iterator_type; typedef iterator_range<ForwardIteratorT> result_type;
first_finder_type first_finder( m_Search.begin(), m_Search.end(), m_Comp );
result_type M=first_finder( Begin, End ); result_type Last=M; <-------------------- THIS LINE HERE
while( M ) { Last=M; M=first_finder( end(M), End ); }
return Last; }
On 5/11/06, Leif Gruenwoldt
wrote: I should note I'm using boost-1.33.1-4 for fedora core 4.
On 5/11/06, Leif Gruenwoldt
wrote: I have implemented a class ( lets call it LC2DateTime ) that uses boost date time in it's implementation. I also have a small test for this class and it builds nicely and runs properly. However when I include LC2DateTime.h in my larger project I get this odd build error that points me to /usr/include/boost/algorithm/string/detail/finder.hpp as the source of the error.
------------------
/usr/include/boost/algorithm/string/detail/finder.hpp: In member function 'boost::iterator_range<Iterator> boost::algorithm::detail::last_finderF
::findit(ForwardIteratorT, ForwardIteratorT, std::forward_iterator_tag) const': /usr/include/boost/algorithm/string/detail/finder.hpp:150: error: expected unqualified-id before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: At global scope: /usr/include/boost/algorithm/string/detail/util.hpp:71: error: expected ',' or '...' before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: In function 'OutputIteratorT boost::algorithm::detail::bounded_copy(InputIteratorT, InputIteratorT)': /usr/include/boost/algorithm/string/detail/util.hpp:76: error: 'DestFirst' was not declared in this scope /usr/include/boost/algorithm/string/detail/util.hpp:77: error: 'DestLast' was not declared in this scope ----------------------
This bug has been bothering me for a while and I actually got my project to build again juggling the placement of of the '#include "LC2DateTime.h" above the other includes in my project. However this problem has reared it's head again and this time no amount of juggling of includes is getting me out of this.
Any thoughts? Is this a problem with the boost libraries or my code?
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
-- Leif Gruenwoldt Simulation Software Developer DLCSPM 4-4-3 (c) Building A31 CFB Kingston
Leif Gruenwoldt wrote:
I have implemented a class ( lets call it LC2DateTime ) that uses boost date time in it's implementation. I also have a small test for this class and it builds nicely and runs properly. However when I include LC2DateTime.h in my larger project I get this odd build error that points me to /usr/include/boost/algorithm/string/detail/finder.hpp as the source of the error.
------------------
/usr/include/boost/algorithm/string/detail/finder.hpp: In member function 'boost::iterator_range<Iterator> boost::algorithm::detail::last_finderF
::findit(ForwardIteratorT, ForwardIteratorT, std::forward_iterator_tag) const': /usr/include/boost/algorithm/string/detail/finder.hpp:150: error: expected unqualified-id before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: At global scope: /usr/include/boost/algorithm/string/detail/util.hpp:71: error: expected ',' or '...' before numeric constant /usr/include/boost/algorithm/string/detail/util.hpp: In function 'OutputIteratorT boost::algorithm::detail::bounded_copy(InputIteratorT, InputIteratorT)': /usr/include/boost/algorithm/string/detail/util.hpp:76: error: 'DestFirst' was not declared in this scope /usr/include/boost/algorithm/string/detail/util.hpp:77: error: 'DestLast' was not declared in this scope ----------------------
This bug has been bothering me for a while and I actually got my project to build again juggling the placement of of the '#include "LC2DateTime.h" above the other includes in my project. However this problem has reared it's head again and this time no amount of juggling of includes is getting me out of this.
Any thoughts? Is this a problem with the boost libraries or my code?
Hard to say given the information. Let's start with some basics. What version of Boost? Which platform? What boost headers are you including and in what order? Jeff
Jeff Garland wrote:
This bug has been bothering me for a while and I actually got my project to build again juggling the placement of of the '#include "LC2DateTime.h" above the other includes in my project. However this problem has reared it's head again and this time no amount of juggling of includes is getting me out of this.
Any thoughts? Is this a problem with the boost libraries or my code?
Hard to say given the information. Let's start with some basics. What version of Boost? Which platform? What boost headers are you including and in what order?
Leif Gruenwoldt wrote:
Sorry for all the blabber. Turns out it was my fault obviously. I had "#define Last 13" in my code.
Thread closed. :)
Opps -- sorry for not reading the whole thread before posting ;-) BTW, this sort of thing is why #define is frowned on for constant values -- but you probably already know that... Jeff
participants (2)
-
Jeff Garland
-
Leif Gruenwoldt