Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-02-27 05:01:05

Boris Gubenko wrote:
>> . The patch for concepts.hpp adds char_type to the explicit
>> specialization of template std::char_traits on type
>> boost::char_architype. char_type is necessary for the platforms
>> using Rogue Wave V2.0 (Tru64 and AlphaVMS) and RW V3.0 (iVMS).
>> While it is not necessary for HP-UX/aCC6 using RW V2.2, it does not
>> break it. Adding char_type also does not break compilation on HP-UX
>> with Gnu libstdc++ and STLport.
>> In the patch, char_type is conditionalized as the following:
>> template<> struct char_traits<boost::char_architype>{
>> #if defined(__DECCXX) && BOOST_WORKAROUND(_RWSTD_VER, >= 0x0203)
>> typedef boost::char_architype char_type;
>> #endif
>> };
>> so it affects only Tru64, AlphaVMS and iVMS. Actually, I don't think
>> that any conditionalization is necessary because adding this typedef
>> does not seem to do any harm.

Will apply.

>> If this patch is applied, regex library test concept_check can be
>> removed from explicit-failures-markup.xml for toolset
>> "hp_cxx-71_006_tru64" (this is release platform).

Will do.

>> . The patch for concept_archetype.hpp adds overload for
>> std::__iterator_category returning __unknown_iterator_tag.
>> This overload allows std::basic_string to be constructed, as John
>> Maddock put it in:
>> <>
>> from "iterator types it doesn't know about".
>> This patch is necessary for RW V2.2. I've conditionalized it with:
>> #if defined(__HP_aCC) && BOOST_WORKAROUND(_RWSTD_VER, == 0x02020100)
>> but I think, that 'defined(__HP_aCC)' can be omitted because this
>> is a pure Rogue Wave library issue. I conditionalized it the way I
>> did out of fear of breaking other platforms using the RW library
>> that I cannot test the patch on.

I'm a bit dubious about applying this for a few reasons:

1) It's not my library.
2) There is no requirement in the std that iterators that are classes derive
from std::iterator - only that iterator_traits "works" with them. That
could be via specialisation of iterator_traits or by providing the necessary
member typedefs so that the primary template definition can do it's thing
(this is what the concept lib does). So IMO this is a bug in the RW 2.2
3) Given (2) this is something we might actually want to know about?

FYI this normally gets implemented using something like:

template <class _Iterator>
inline typename iterator_traits<_Iterator>::iterator_category
__iterator_category (const _Iterator&)
    typedef typename iterator_traits<_Iterator>::iterator_category
    return _IterCategory ();

>> . The patch for regex_traits.hpp changes aCC - specific
>> conditionalization which is wrong for aCC6. I have no idea why this
>> conditionalization was necessary in the first place, but I did not
>> remove it: I just restricted it to pre-aCC6 compilers.

This was already applied to HEAD, but I'll apply to the branch as well now
that it's had time to shake out any issues.

Thanks for working on this,


Boost list run by bdawes at, gregod at, cpdaniel at, john at