boostorg / range

Boost.org range module
http://boost.org/libs/range
43 stars 104 forks source link

Fix Error C4596: 'difference_type': illegal qualified name in member declaration #65

Closed ncook-hxgn closed 6 years ago

ncook-hxgn commented 6 years ago

Hi there,

When compiling against boost 1.66.0 with VS 2017 Professional 15.5.6 and MSVC 14.1, a wild C4596 Illegal Qualified Name' appeared.

The fix was a simple one, I hope I used the right branch - this is my first ever PR. We compile with /Wall and treat warning as errors..

I hope this is useful.

ncook-hxgn commented 6 years ago

The CI doesn't test MSVC /Visual Studio and that's where I found this... ?

ncook-hxgn commented 6 years ago

Looks like I have massively failed the CI tests. Glad these were here.

I could guard my change with a preprocessor expression such as

if defined(_MSC_VER) && _MSC_VER > 1911

...

endif

Does anyone have any advice on preferred course of action?

ncook-hxgn commented 6 years ago

:dancer: