Boost logo

Boost :

Subject: [boost] [range] [concepts] Boost 1.68 beta build error in RandomAccessIteratorConcept using latest MSVC
From: Viktor Sehr (viktor.sehr_at_[hidden])
Date: 2018-07-20 11:35:44


The following error is emitted in latest MSVC building Boost 1.68 beta:

1>\boost\range\concepts.hpp(257): error C3646: 'n': unknown override
specifier
1>\boost\range\concepts.hpp(264): note: see reference to class template
instantiation 'boost::range_detail::RandomAccessIteratorConcept<Iterator>'
being compiled
1>\range\concepts.hpp(257): error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int

Unfortunately I'm not competent enough to determine what is causing the
error:

Full struct:
 template<class Iterator>
         struct RandomAccessIteratorConcept
             : BidirectionalIteratorConcept<Iterator>
         {
 #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
             BOOST_RANGE_CONCEPT_ASSERT((
                 Convertible<
                     BOOST_DEDUCED_TYPENAME
RandomAccessIteratorConcept::traversal_category,
                     random_access_traversal_tag
>));

             BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept)
             {
                 i += n;
                 i = i + n;
                 i = n + i;
                 i -= n;
                 i = i - n;
                 n = i - j;
             }
         private:
 // MSVC 14.1 - avoid C4596: 'difference_type': illegal qualified name in
member declaration
 #if defined(_MSC_VER) && _MSC_VER >= 1912
             BOOST_DEDUCED_TYPENAME difference_type n;
 #else
             BOOST_DEDUCED_TYPENAME
RandomAccessIteratorConcept::difference_type n;
 #endif
             Iterator i;
             Iterator j;
 #endif
         };

br/Viktor Sehr


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