Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-02-13 17:14:23


Thorsten Ottosen wrote:
> Tobias Schwinger wrote:
>
>>There's an ICE problem in range/detail/common.hpp with BCC.
>>
>>--- boost/range/detail/common.hpp 26 Jul 2004 14:20:06 -0000 1.3
>>+++ boost/range/detail/common.hpp 9 Feb 2006 19:20:27 -0000
>>@@ -78,35 +78,35 @@
>> template< typename C >
>> class range
>> {
>>- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_pair_,
>>+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_pair_,
>> boost::range_detail::std_pair_,
>> void >::type pair_t;
>>- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_array_,
>>+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_array_,
>>
>>etc.

^^^^^^ NOTE: the patch is truncated.

I was tempted to post something like: "apply 'the fix' and not 'that patch'" (but then discarded the idea.

>>
>>solves it. OK to commit?
>>
>
>
> Tobias,
>
> I couldn't see if this "::" prefix was only a problem for
> boost::range_detail::range_helper<C> ?
>
> Was it neede on other names?

It's a general problem with integral constant expressions and Borland so it would be best to apply it in all places where a static member constant is used as a non-type template argument...

Anyway, the tests (except the one marked as expected failure for that compiler) pass if the full patch (see attached file) is applied.

Regards,

Tobias

Index: boost/range/detail/common.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/range/detail/common.hpp,v
retrieving revision 1.3
diff -u -r1.3 common.hpp
--- boost/range/detail/common.hpp 26 Jul 2004 14:20:06 -0000 1.3
+++ boost/range/detail/common.hpp 9 Feb 2006 19:20:27 -0000
@@ -78,35 +78,35 @@
         template< typename C >
         class range
         {
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_pair_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_pair_,
                                                                   boost::range_detail::std_pair_,
                                                                   void >::type pair_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_array_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_array_,
                                                                     boost::range_detail::array_,
                                                                     pair_t >::type array_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_string_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_string_,
                                                                     boost::range_detail::string_,
                                                                     array_t >::type string_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_const_char_ptr_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_char_ptr_,
                                                                     boost::range_detail::const_char_ptr_,
                                                                     string_t >::type const_char_ptr_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_char_ptr_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_ptr_,
                                                                     boost::range_detail::char_ptr_,
                                                                     const_char_ptr_t >::type char_ptr_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_const_wchar_t_ptr_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_wchar_t_ptr_,
                                                                     boost::range_detail::const_wchar_t_ptr_,
                                                                     char_ptr_t >::type const_wchar_ptr_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_wchar_t_ptr_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_ptr_,
                                                                     boost::range_detail::wchar_t_ptr_,
                                                                     const_wchar_ptr_t >::type wchar_ptr_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_wchar_t_array_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_array_,
                                                                     boost::range_detail::wchar_t_array_,
                                                                     wchar_ptr_t >::type wchar_array_t;
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::range_detail::range_helper<C>::is_char_array_,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_array_,
                                                                     boost::range_detail::char_array_,
                                                                     wchar_array_t >::type char_array_t;
         public:
- typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< boost::is_void<char_array_t>::value,
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::is_void<char_array_t>::value,
                                                                     boost::range_detail::std_container_,
                                                                     char_array_t >::type type;
         }; // class 'range'


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk