
This goes a small way to getting string_algo to work with bcc32. The current errors I'm getting are in detail/find_format.hpp. If anyone can suggest a solution, I'd be happy to try it out. Thanks Russell regex_test.cpp: Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 133: 'operator!' not implemented in type 'find_format_store<const char *,regex_formatF<string>,string>' for arguments of the same type in function string find_format_copy_impl2<string,find_regexF<regex>,regex_formatF<string>,regex_search_result<const char *>,string>(const string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<const char *> &,const string &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 133: 'operator!' not implemented in type 'find_format_store<const char *,empty_formatF<char>,empty_container<char> >' for arguments of the same type in function string find_format_copy_impl2<string,find_regexF<regex>,empty_formatF<char>,regex_search_result<const char *>,empty_container<char> >(const string &,find_regexF<regex>,empty_formatF<char>,const regex_search_result<const char *> &,const empty_container<char> &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 72: 'operator!' not implemented in type 'find_format_store<const char *,regex_formatF<string>,string>' for arguments of the same type in function back_insert_iterator<string> find_format_copy_impl2<back_insert_iterator<string>,string,find_regexF<regex>,regex_formatF<string>,regex_search_result<const char *>,string>(back_insert_iterator<string>,const string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<const char *> &,const string &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 72: 'operator!' not implemented in type 'find_format_store<const char *,empty_formatF<char>,empty_container<char> >' for arguments of the same type in function back_insert_iterator<string> find_format_copy_impl2<back_insert_iterator<string>,string,find_regexF<regex>,empty_formatF<char>,regex_search_result<const char *>,empty_container<char> >(back_insert_iterator<string>,const string &,find_regexF<regex>,empty_formatF<char>,const regex_search_result<const char *> &,const empty_container<char> &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 193: 'operator!' not implemented in type 'find_format_store<char *,regex_formatF<string>,string>' for arguments of the same type in function void find_format_impl2<string,find_regexF<regex>,regex_formatF<string>,regex_search_result<char *>,string>(string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<char *> &,const string &) Error E2228 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 193: Too many error or warning messages in function void find_format_impl2<string,find_regexF<regex>,regex_formatF<string>,regex_search_result<char *>,string>(string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<char *> &,const string &) Index: boost/algorithm/string/config.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/config.hpp,v retrieving revision 1.4 diff -u -r1.4 config.hpp --- boost/algorithm/string/config.hpp 16 Jul 2004 13:57:40 -0000 1.4 +++ boost/algorithm/string/config.hpp 10 May 2005 13:08:30 -0000 @@ -17,11 +17,7 @@ # error "macro already defined!" #endif -#ifdef __BORLANDC__ -#define BOOST_STRING_TYPENAME -#else #define BOOST_STRING_TYPENAME BOOST_DEDUCED_TYPENAME -#endif // Metrowerks workaround #if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x Index: boost/algorithm/string/formatter.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/formatter.hpp,v retrieving revision 1.5 diff -u -r1.5 formatter.hpp --- boost/algorithm/string/formatter.hpp 12 Apr 2005 16:50:41 -0000 1.5 +++ boost/algorithm/string/formatter.hpp 10 May 2005 13:06:23 -0000 @@ -23,7 +23,7 @@ for a specific Formatter. An example of such a cooperation is regex_finder and regex_formatter. - Formatters are used as pluggable components for replace facilities. + Formatters are used as pluggable components for replace facilities. This header contains generator functions for the Formatters provided in this library. */ @@ -64,15 +64,19 @@ //! Empty formatter /*! Construct the \c empty_formatter. Empty formatter always returns an empty - sequence. + sequence. \param Input container used to select a correct value_type for the resulting empty_container<>. \return An instance of the \c empty_formatter object. */ template<typename RangeT> - inline detail::empty_formatF< + inline detail::empty_formatF< +// #ifdef __BORLANDC__ +// typename range_value<RangeT>::type> +// #else BOOST_STRING_TYPENAME range_value<RangeT>::type> +// #endif empty_formatter(const RangeT&) { return detail::empty_formatF< Index: boost/algorithm/string/sequence_traits.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/sequence_traits.hpp,v retrieving revision 1.7 diff -u -r1.7 sequence_traits.hpp --- boost/algorithm/string/sequence_traits.hpp 15 Jul 2004 21:48:25 -0000 1.7 +++ boost/algorithm/string/sequence_traits.hpp 10 May 2005 12:56:13 -0000 @@ -24,7 +24,7 @@ Due to a language restriction, it is not currently possible to define specializations for stl containers without including the corresponding header. To decrease the overhead - needed by this inclusion, user can selectively include a specialization + needed by this inclusion, user can selectively include a specialization header for a specific container. They are located in boost/algorithm/string/stl directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp header which contains specializations for all stl containers. @@ -39,7 +39,7 @@ //! Native replace tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the container has basic_string like native replace @@ -49,31 +49,31 @@ //! Stable iterators tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's insert/replace/erase methods do not invalidate existing iterators. */ - no_type has_stable_iterators_tester(...); + no_type has_stable_iterators_tester(...); //! const time insert tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's insert method is working in constant time */ - no_type has_const_time_insert_tester(...); + no_type has_const_time_insert_tester(...); //! const time erase tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's erase method is working in constant time */ - no_type has_const_time_erase_tester(...); + no_type has_const_time_erase_tester(...); #endif //BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -89,7 +89,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -99,9 +99,9 @@ BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - typedef mpl::bool_<value> type; + + typedef mpl::bool_<has_native_replace<T>::value> type; }; @@ -117,7 +117,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -128,13 +128,13 @@ # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_stable_iterators<T>::value> type; }; //! Const time insert trait /*! - This trait specifies that the sequence's insert method has + This trait specifies that the sequence's insert method has constant time complexity. */ template< typename T > @@ -144,7 +144,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -155,13 +155,13 @@ # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_insert<T>::value> type; }; //! Const time erase trait /*! - This trait specifies that the sequence's erase method has + This trait specifies that the sequence's erase method has constant time complexity. */ template< typename T > @@ -171,7 +171,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -182,7 +182,7 @@ # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_erase<T>::value> type; }; } // namespace algorithm

Hi, On Tue, May 10, 2005 at 02:10:42PM +0100, Russell Hind wrote:
This goes a small way to getting string_algo to work with bcc32. The current errors I'm getting are in detail/find_format.hpp. If anyone can suggest a solution, I'd be happy to try it out.
Thanks
Russell
regex_test.cpp: Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 133: 'operator!' not implemented in type 'find_format_store<const char *,regex_formatF<string>,string>' for arguments of the same type in function string
[snip] As far as I can tell, it seems, that bcc does not handle safe-bool idiom well. Problem leads to boost::iterator_range (currently present in Boost.Range) Pavol

Pavol Droba wrote:
[snip]
As far as I can tell, it seems, that bcc does not handle safe-bool idiom well. Problem leads to boost::iterator_range (currently present in Boost.Range)
Here is a modification of the patch. It doesn't fix the operator! errors (David Abrahams pointed out a possible solution for this, can you add this)? These are the only errors I'm getting now in the test log (see attached). Will this be applied? Cheers Russell Index: boost/algorithm/string/compare.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/compare.hpp,v retrieving revision 1.2 diff -u -r1.2 compare.hpp --- boost/algorithm/string/compare.hpp 15 Jul 2004 21:48:25 -0000 1.2 +++ boost/algorithm/string/compare.hpp 11 May 2005 07:34:24 -0000 @@ -14,7 +14,7 @@ #include <locale> /*! \file - Defines element comparison predicates. Many algorithms in this library can + Defines element comparison predicates. Many algorithms in this library can take an additional argument with a predicate used to compare elements. This makes it possible, for instance, to have case insensitive versions of the algorithms. @@ -22,7 +22,7 @@ namespace boost { namespace algorithm { - + // is_equal functor -----------------------------------------------// //! is_equal functor @@ -54,24 +54,28 @@ /*! \param Loc locales used for comparison */ - is_iequal( const std::locale& Loc=std::locale() ) : + is_iequal( const std::locale& Loc=std::locale() ) : m_Loc( Loc ) {} - //! Function operator + //! Function operator /*! Compare two operands. Case is ignored. */ template< typename T1, typename T2 > bool operator ()( const T1& Arg1, const T2& Arg2 ) const { - return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper(Arg1)==std::toupper(Arg2); + #else + return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); + #endif } private: std::locale m_Loc; }; - } // namespace algorithm + } // namespace algorithm // pull names to the boost namespace using algorithm::is_equal; Index: boost/algorithm/string/config.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/config.hpp,v retrieving revision 1.4 diff -u -r1.4 config.hpp --- boost/algorithm/string/config.hpp 16 Jul 2004 13:57:40 -0000 1.4 +++ boost/algorithm/string/config.hpp 11 May 2005 07:26:04 -0000 @@ -17,11 +17,7 @@ # error "macro already defined!" #endif -#ifdef __BORLANDC__ -#define BOOST_STRING_TYPENAME -#else #define BOOST_STRING_TYPENAME BOOST_DEDUCED_TYPENAME -#endif // Metrowerks workaround #if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x Index: boost/algorithm/string/sequence_traits.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/sequence_traits.hpp,v retrieving revision 1.7 diff -u -r1.7 sequence_traits.hpp --- boost/algorithm/string/sequence_traits.hpp 15 Jul 2004 21:48:25 -0000 1.7 +++ boost/algorithm/string/sequence_traits.hpp 11 May 2005 07:24:39 -0000 @@ -24,7 +24,7 @@ Due to a language restriction, it is not currently possible to define specializations for stl containers without including the corresponding header. To decrease the overhead - needed by this inclusion, user can selectively include a specialization + needed by this inclusion, user can selectively include a specialization header for a specific container. They are located in boost/algorithm/string/stl directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp header which contains specializations for all stl containers. @@ -39,7 +39,7 @@ //! Native replace tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the container has basic_string like native replace @@ -49,31 +49,31 @@ //! Stable iterators tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's insert/replace/erase methods do not invalidate existing iterators. */ - no_type has_stable_iterators_tester(...); + no_type has_stable_iterators_tester(...); //! const time insert tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's insert method is working in constant time */ - no_type has_const_time_insert_tester(...); + no_type has_const_time_insert_tester(...); //! const time erase tester /*! - Declare an override of this tester function with return + Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's erase method is working in constant time */ - no_type has_const_time_erase_tester(...); + no_type has_const_time_erase_tester(...); #endif //BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -89,7 +89,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -99,9 +99,9 @@ BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - typedef mpl::bool_<value> type; + + typedef mpl::bool_<has_native_replace<T>::value> type; }; @@ -117,7 +117,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -128,13 +128,13 @@ # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_stable_iterators<T>::value> type; }; //! Const time insert trait /*! - This trait specifies that the sequence's insert method has + This trait specifies that the sequence's insert method has constant time complexity. */ template< typename T > @@ -144,7 +144,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -155,13 +155,13 @@ # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_insert<T>::value> type; }; //! Const time erase trait /*! - This trait specifies that the sequence's erase method has + This trait specifies that the sequence's erase method has constant time complexity. */ template< typename T > @@ -171,7 +171,7 @@ private: static T* t; public: - BOOST_STATIC_CONSTANT(bool, value=( + BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: @@ -182,7 +182,7 @@ # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_erase<T>::value> type; }; } // namespace algorithm Index: boost/algorithm/string/detail/case_conv.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/detail/case_conv.hpp,v retrieving revision 1.1 diff -u -r1.1 case_conv.hpp --- boost/algorithm/string/detail/case_conv.hpp 4 Mar 2004 22:11:41 -0000 1.1 +++ boost/algorithm/string/detail/case_conv.hpp 11 May 2005 07:36:36 -0000 @@ -20,7 +20,7 @@ // case conversion functors -----------------------------------------------// - // a tolower functor + // a tolower functor template<typename CharT> struct to_lowerF : public std::unary_function<CharT, CharT> { @@ -30,13 +30,17 @@ // Operation CharT operator ()( CharT Ch ) const { - return std::tolower( Ch, m_Loc ); + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::tolower( Ch); + #else + return std::tolower( Ch, m_Loc ); + #endif } private: const std::locale& m_Loc; }; - // a toupper functor + // a toupper functor template<typename CharT> struct to_upperF : public std::unary_function<CharT, CharT> { @@ -46,7 +50,11 @@ // Operation CharT operator ()( CharT Ch ) const { - return std::toupper( Ch, m_Loc ); + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + return std::toupper( Ch); + #else + return std::toupper( Ch, m_Loc ); + #endif } private: const std::locale& m_Loc; Index: boost/algorithm/string/detail/classification.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/detail/classification.hpp,v retrieving revision 1.6 diff -u -r1.6 classification.hpp --- boost/algorithm/string/detail/classification.hpp 12 Apr 2005 16:50:42 -0000 1.6 +++ boost/algorithm/string/detail/classification.hpp 11 May 2005 08:03:31 -0000 @@ -25,9 +25,9 @@ namespace boost { namespace algorithm { namespace detail { - + // classification functors -----------------------------------------------// - + // is_classified functor struct is_classifiedF : public predicate_facade<is_classifiedF> @@ -35,7 +35,7 @@ // Boost.Lambda support template <class Args> struct sig { typedef bool type; }; - // Constructor from a locale + // Constructor from a locale is_classifiedF(std::ctype_base::mask Type, std::locale const & Loc = std::locale()) : m_Type(Type), m_Locale(Loc) {} @@ -46,13 +46,21 @@ return std::use_facet< std::ctype<CharT> >(m_Locale).is( m_Type, Ch ); } + #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) + template<> + bool operator()( char const Ch ) const + { + return std::use_facet< std::ctype<char> >(m_Locale).is( m_Type, Ch ); + } + #endif + private: const std::ctype_base::mask m_Type; const std::locale m_Locale; }; - // is_any_of functor - /* + // is_any_of functor + /* returns true if the value is from the specified set */ template<typename CharT> @@ -62,26 +70,26 @@ // Boost.Lambda support template <class Args> struct sig { typedef bool type; }; - // Constructor + // Constructor template<typename RangeT> - is_any_ofF( const RangeT& Range ) : + is_any_ofF( const RangeT& Range ) : m_Set( begin(Range), end(Range) ) {} - + // Operation template<typename Char2T> bool operator()( Char2T Ch ) const { return m_Set.find(Ch)!=m_Set.end(); } - + private: // set cannot operate on const value-type typedef typename remove_const<CharT>::type set_value_type; - std::set<set_value_type> m_Set; + std::set<set_value_type> m_Set; }; - // is_from_range functor - /* + // is_from_range functor + /* returns true if the value is from the specified range. (i.e. x>=From && x>=To) */ @@ -92,16 +100,16 @@ // Boost.Lambda support template <class Args> struct sig { typedef bool type; }; - // Constructor + // Constructor is_from_rangeF( CharT From, CharT To ) : m_From(From), m_To(To) {} - + // Operation template<typename Char2T> bool operator()( Char2T Ch ) const { - return ( m_From <= Ch ) && ( Ch <= m_To ); + return ( m_From <= Ch ) && ( Ch <= m_To ); } - + private: CharT m_From; CharT m_To; @@ -123,11 +131,11 @@ // Operation template<typename CharT> - bool operator()( CharT Ch ) const + bool operator()( CharT Ch ) const { return m_Pred1(Ch) && m_Pred2(Ch); } - + private: Pred1T m_Pred1; Pred2T m_Pred2; @@ -148,11 +156,11 @@ // Operation template<typename CharT> - bool operator()( CharT Ch ) const + bool operator()( CharT Ch ) const { return m_Pred1(Ch) || m_Pred2(Ch); } - + private: Pred1T m_Pred1; Pred2T m_Pred2; @@ -172,11 +180,11 @@ // Operation template<typename CharT> - bool operator()( CharT Ch ) const + bool operator()( CharT Ch ) const { return !m_Pred(Ch); } - + private: PredT m_Pred; }; Index: boost/algorithm/string/std/list_traits.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/std/list_traits.hpp,v retrieving revision 1.5 diff -u -r1.5 list_traits.hpp --- boost/algorithm/string/std/list_traits.hpp 14 Jul 2004 21:21:54 -0000 1.5 +++ boost/algorithm/string/std/list_traits.hpp 11 May 2005 07:29:22 -0000 @@ -33,9 +33,9 @@ template<typename T, typename AllocT> yes_type has_const_time_erase_tester( const ::std::list<T,AllocT>* ); - + #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - + // stable iterators trait template<typename T, typename AllocT> class has_stable_iterators< ::std::list<T,AllocT> > @@ -46,7 +46,7 @@ #else BOOST_STATIC_CONSTANT(bool, value=true); #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_stable_iterators<T>::value> type; }; // const time insert trait @@ -59,7 +59,7 @@ #else BOOST_STATIC_CONSTANT(bool, value=true); #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_insert<T>::value> type; }; // const time erase trait @@ -72,11 +72,11 @@ #else BOOST_STATIC_CONSTANT(bool, value=true); #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_erase<T>::value> type; }; #endif - + } // namespace algorithm } // namespace boost Index: boost/algorithm/string/std/slist_traits.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/std/slist_traits.hpp,v retrieving revision 1.5 diff -u -r1.5 slist_traits.hpp --- boost/algorithm/string/std/slist_traits.hpp 12 Apr 2005 16:01:48 -0000 1.5 +++ boost/algorithm/string/std/slist_traits.hpp 11 May 2005 07:29:00 -0000 @@ -35,7 +35,7 @@ yes_type has_const_time_erase_tester( const BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT>* ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - + // stable iterators trait template<typename T, typename AllocT> class has_stable_iterators< BOOST_STD_EXTENSION_NAMESPACE::slist<T,AllocT> > @@ -46,7 +46,7 @@ #else BOOST_STATIC_CONSTANT(bool, value=true); #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_stable_iterators<T>::value> type; }; // const time insert trait @@ -59,7 +59,7 @@ #else BOOST_STATIC_CONSTANT(bool, value=true); #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_insert<T>::value> type; }; // const time erase trait @@ -72,7 +72,7 @@ #else BOOST_STATIC_CONSTANT(bool, value=true); #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_const_time_erase<T>::value> type; }; #endif Index: boost/algorithm/string/std/string_traits.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/algorithm/string/std/string_traits.hpp,v retrieving revision 1.4 diff -u -r1.4 string_traits.hpp --- boost/algorithm/string/std/string_traits.hpp 14 Jul 2004 21:21:54 -0000 1.4 +++ boost/algorithm/string/std/string_traits.hpp 11 May 2005 07:29:09 -0000 @@ -38,7 +38,7 @@ BOOST_STATIC_CONSTANT(bool, value=true); #endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_<value> type; + typedef mpl::bool_<has_native_replace<T>::value> type; }; ****************************************************** Building Boost.Regex with Unicode/ICU support disabled. HINT: define the environment variable ICU_PATH to point to the root directy of your ICU installation if you have one. Couldn't find utypes.h in ****************************************************** boost-test(RUN) "algorithm/string/regex" : "libs\algorithm\string\test\regex_test.cpp" boost-test(RUN) "algorithm/string/replace" : "libs\algorithm\string\test\replace_test.cpp" boost-test(RUN) "algorithm/string/split" : "libs\algorithm\string\test\split_test.cpp" boost-test(RUN) "algorithm/string/find" : "libs\algorithm\string\test\find_test.cpp" boost-test(RUN) "algorithm/string/predicate" : "libs\algorithm\string\test\predicate_test.cpp" boost-test(RUN) "algorithm/string/conv" : "libs\algorithm\string\test\conv_test.cpp" boost-test(RUN) "algorithm/string/trim" : "libs\algorithm\string\test\trim_test.cpp" ...found 1132 targets... ...updating 30 targets... borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\regex.test\borland\debug\regex_test.obj regex_test.cpp: Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 133: 'operator!' not implemented in type 'find_format_store<const char *,regex_formatF<string>,string>' for arguments of the same type in function string find_format_copy_impl2<string,find_regexF<regex>,regex_formatF<string>,regex_search_result<const char *>,string>(const string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<const char *> &,const string &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 133: 'operator!' not implemented in type 'find_format_store<const char *,empty_formatF<char>,empty_container<char> >' for arguments of the same type in function string find_format_copy_impl2<string,find_regexF<regex>,empty_formatF<char>,regex_search_result<const char *>,empty_container<char> >(const string &,find_regexF<regex>,empty_formatF<char>,const regex_search_result<const char *> &,const empty_container<char> &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 72: 'operator!' not implemented in type 'find_format_store<const char *,regex_formatF<string>,string>' for arguments of the same type in function back_insert_iterator<string> find_format_copy_impl2<back_insert_iterator<string>,string,find_regexF<regex>,regex_formatF<string>,regex_search_result<const char *>,string>(back_insert_iterator<string>,const string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<const char *> &,const string &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 72: 'operator!' not implemented in type 'find_format_store<const char *,empty_formatF<char>,empty_container<char> >' for arguments of the same type in function back_insert_iterator<string> find_format_copy_impl2<back_insert_iterator<string>,string,find_regexF<regex>,empty_formatF<char>,regex_search_result<const char *>,empty_container<char> >(back_insert_iterator<string>,const string &,find_regexF<regex>,empty_formatF<char>,const regex_search_result<const char *> &,const empty_container<char> &) Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 193: 'operator!' not implemented in type 'find_format_store<char *,regex_formatF<string>,string>' for arguments of the same type in function void find_format_impl2<string,find_regexF<regex>,regex_formatF<string>,regex_search_result<char *>,string>(string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<char *> &,const string &) Error E2228 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/find_format.hpp 193: Too many error or warning messages in function void find_format_impl2<string,find_regexF<regex>,regex_formatF<string>,regex_search_result<char *>,string>(string &,find_regexF<regex>,regex_formatF<string>,const regex_search_result<char *> &,const string &) *** 6 errors in Compile *** "bcc32" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- -v -Od -vi- -tWC -tWR -tWC -WM- -w-8001 -I"..\..\..\..\bin\boost\libs\algorithm\string\test" -I"c:\Users\russell\Projects\boost-cvs\boost" -o"..\..\..\..\bin\boost\libs\algorithm\string\test\regex.test\borland\debug\regex_test.obj" "regex_test.cpp" ...failed borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\regex.test\borland\debug\regex_test.obj... ...skipped <@boost!libs!algorithm!string!test\regex.test\borland\debug>regex.CMD for lack of <@boost!libs!algorithm!string!test\regex.test\borland\debug>regex_test.obj... ...skipped <@boost!libs!algorithm!string!test\regex.test\borland\debug>regex.exe for lack of <@boost!libs!algorithm!string!test\regex.test\borland\debug>regex.CMD... ...skipped <@boost!libs!algorithm!string!test\regex.test\borland\debug>regex.run for lack of <@boost!libs!algorithm!string!test\regex.test\borland\debug>regex.exe... borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\replace.test\borland\debug\replace_test.obj replace_test.cpp: Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<const char *>' for arguments of the same type in function operator iterator_range<const char *> () <const char *>(const char *,const char *) const Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<char *>' for arguments of the same type in function operator iterator_range<char *> () <char *>(char *,char *) const Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<_List_iterator<char,_Nonconst_traits<char> > >' for arguments of the same type in function operator iterator_range<_List_iterator<char,_Nonconst_traits<char> > > () <_List_iterator<char,_Nonconst_traits<char> > >(_List_iterator<char,_Nonconst_traits<char> >,_List_iterator<char,_Nonconst_traits<char> >) const Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<const char *>' for arguments of the same type in function operator iterator_range<const char *> () <const char *>(const char *,const char *) const Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<char *>' for arguments of the same type in function operator iterator_range<char *> () <char *>(char *,char *) const Error E2228 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: Too many error or warning messages in function operator iterator_range<char *> () <char *>(char *,char *) const *** 6 errors in Compile *** "bcc32" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- -v -Od -vi- -tWC -tWR -tWC -WM- -w-8001 -I"..\..\..\..\bin\boost\libs\algorithm\string\test" -I"c:\Users\russell\Projects\boost-cvs\boost" -o"..\..\..\..\bin\boost\libs\algorithm\string\test\replace.test\borland\debug\replace_test.obj" "replace_test.cpp" ...failed borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\replace.test\borland\debug\replace_test.obj... ...skipped <@boost!libs!algorithm!string!test\replace.test\borland\debug>replace.CMD for lack of <@boost!libs!algorithm!string!test\replace.test\borland\debug>replace_test.obj... ...skipped <@boost!libs!algorithm!string!test\replace.test\borland\debug>replace.exe for lack of <@boost!libs!algorithm!string!test\replace.test\borland\debug>replace.CMD... ...skipped <@boost!libs!algorithm!string!test\replace.test\borland\debug>replace.run for lack of <@boost!libs!algorithm!string!test\replace.test\borland\debug>replace.exe... borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\split.test\borland\debug\split_test.obj split_test.cpp: borland-Link-action ..\..\..\..\bin\boost\libs\algorithm\string\test\split.test\borland\debug\split.exe execute-test ..\..\..\..\bin\boost\libs\algorithm\string\test\split.test\borland\debug\split.run 1 file(s) copied. **passed** ..\..\..\..\bin\boost\libs\algorithm\string\test\split.test\borland\debug\split.test borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\find.test\borland\debug\find_test.obj find_test.cpp: Warning W8092 find_test.cpp 170: template argument RangeT passed to 'find' is not an iterator: input iterator required in function find_test() Warning W8092 find_test.cpp 175: template argument RangeT passed to 'find' is not an iterator: input iterator required in function find_test() Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<char *>' for arguments of the same type in function operator iterator_range<char *> () <char *>(char *,char *) const Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<const char *>' for arguments of the same type in function operator iterator_range<const char *> () <const char *>(const char *,const char *) const Error E2093 c:\Users\russell\Projects\boost-cvs\boost\boost/algorithm/string/detail/finder.hpp 259: 'operator!' not implemented in type 'iterator_range<const char *>' for arguments of the same type in function operator iterator_range<const char *> () <const char *>(const char *,const char *) const *** 3 errors in Compile *** "bcc32" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- -v -Od -vi- -tWC -tWR -tWC -WM- -w-8001 -I"..\..\..\..\bin\boost\libs\algorithm\string\test" -I"c:\Users\russell\Projects\boost-cvs\boost" -o"..\..\..\..\bin\boost\libs\algorithm\string\test\find.test\borland\debug\find_test.obj" "find_test.cpp" ...failed borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\find.test\borland\debug\find_test.obj... ...skipped <@boost!libs!algorithm!string!test\find.test\borland\debug>find.CMD for lack of <@boost!libs!algorithm!string!test\find.test\borland\debug>find_test.obj... ...skipped <@boost!libs!algorithm!string!test\find.test\borland\debug>find.exe for lack of <@boost!libs!algorithm!string!test\find.test\borland\debug>find.CMD... ...skipped <@boost!libs!algorithm!string!test\find.test\borland\debug>find.run for lack of <@boost!libs!algorithm!string!test\find.test\borland\debug>find.exe... borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\predicate.test\borland\debug\predicate_test.obj predicate_test.cpp: borland-Link-action ..\..\..\..\bin\boost\libs\algorithm\string\test\predicate.test\borland\debug\predicate.exe execute-test ..\..\..\..\bin\boost\libs\algorithm\string\test\predicate.test\borland\debug\predicate.run 1 file(s) copied. **passed** ..\..\..\..\bin\boost\libs\algorithm\string\test\predicate.test\borland\debug\predicate.test borland-C++-action ..\..\..\..\bin\boost\libs\algorithm\string\test\trim.test\borland\debug\trim_test.obj trim_test.cpp: borland-Link-action ..\..\..\..\bin\boost\libs\algorithm\string\test\trim.test\borland\debug\trim.exe execute-test ..\..\..\..\bin\boost\libs\algorithm\string\test\trim.test\borland\debug\trim.run 1 file(s) copied. **passed** ..\..\..\..\bin\boost\libs\algorithm\string\test\trim.test\borland\debug\trim.test ...failed updating 3 targets... ...skipped 12 targets... ...updated 15 targets...

On Wed, May 11, 2005 at 09:04:27AM +0100, Russell Hind wrote:
Pavol Droba wrote:
[snip]
As far as I can tell, it seems, that bcc does not handle safe-bool idiom well. Problem leads to boost::iterator_range (currently present in Boost.Range)
Here is a modification of the patch. It doesn't fix the operator! errors (David Abrahams pointed out a possible solution for this, can you add this)?
I'm not aware of it. Can you point where I can find it?
These are the only errors I'm getting now in the test log (see attached).
Will this be applied?
I will definitely apply your patches. Thanks very much for your efford. Regards, Pavol.

Pavol Droba wrote:
I'm not aware of it. Can you point where I can find it?
Sorry, meant to say Dog Gregor. His comment was: <quote> We've run into this before. You need to implement an "operator!" </quote> Looks like a specific Borland problem where you need to define ! for the safe_bool stuff. Thanks Russell

On Wed, May 11, 2005 at 10:21:18AM +0100, Russell Hind wrote:
Pavol Droba wrote:
I'm not aware of it. Can you point where I can find it?
Sorry, meant to say Dog Gregor. His comment was:
<quote> We've run into this before. You need to implement an "operator!" </quote>
Looks like a specific Borland problem where you need to define ! for the safe_bool stuff.
I see. It should not be a problem. Could you try to patch boost/range/iterator_range.hpp? I'm not familiar with bcc defines and this has to be put into conditional guard. I have applied you patches already. They seems to be fine. Regards, Pavol

Pavol Droba wrote:
I see. It should not be a problem. Could you try to patch boost/range/iterator_range.hpp? I'm not familiar with bcc defines and this has to be put into conditional guard.
What is the problem with boost/range/iterator_range.hpp? The range tests seem to run. Is there something that shows a problem with it? Thanks Russell

On Wed, May 11, 2005 at 11:10:31AM +0100, Russell Hind wrote:
Pavol Droba wrote:
I see. It should not be a problem. Could you try to patch boost/range/iterator_range.hpp? I'm not familiar with bcc defines and this has to be put into conditional guard.
What is the problem with boost/range/iterator_range.hpp? The range tests seem to run. Is there something that shows a problem with it?
Problematic operator! is there. Probably iterator_range test do not cover this issue. Regards, Pavol

Hi, I have fixed the problem with ! operator, but there is still some problem with bcc32. Can you please have a look? Regression tests show two errors. One is related to regex suppors, the other one fails to replace tests. Since currently regex failes completely on bcc, it would be nice if at least the second one can be fixed. Best Regards, Pavol

Pavol Droba wrote:
Hi,
I have fixed the problem with ! operator, but there is still some problem with bcc32. Can you please have a look?
Regression tests show two errors. One is related to regex suppors, the other one fails to replace tests.
Since currently regex failes completely on bcc, it would be nice if at least the second one can be fixed.
Yep, I'll take a look. Thanks Russell

On Mon, May 16, 2005 at 12:31:24PM +0200, Pavol Droba wrote:
Hi,
I have fixed the problem with ! operator, but there is still some problem with bcc32. Can you please have a look?
Regression tests show two errors. One is related to regex suppors, the other one fails to replace tests.
Since currently regex failes completely on bcc, it would be nice if at least the second one can be fixed.
Best Regards, Pavol
Oops. I'm sorry, this mail was supposed to go privately to Russell Hind. Unfortunately, my mailer played a dirty trick on me, so it ends up on the list. Pavol.
participants (3)
-
Doug Gregor
-
Pavol Droba
-
Russell Hind