boostorg / boostorg/range

#include <boost/range/mfc.hpp> causes a compilation error

Open
#143 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
45
Forks
104
PR merge metrics
No merged PRs in 30d

Description

Hi,
I updated the visual C++ compiler from 17.0.6 to 17.4.6 and I'm getting a compilation error by including :

1>\boost\range\detail\microsoft.hpp(626,33): error C2440: 'return': cannot convert from 'const void *' to 'const void *&'
1>\boost\range\detail\microsoft.hpp(624,1): message : while compiling class template member function 'const void *&boost::range_detail_microsoft::list_iterator::dereference(void) const'
1> with
1> [
1> X=CPtrList
1> ]
1>\boost\iterator\iterator_facade.hpp(631,11): message : see reference to function template instantiation 'const void *&boost::range_detail_microsoft::list_iterator::dereference(void) const' being compiled
1> with
1> [
1> X=CPtrList
1> ]
1>\boost\range\mfc.hpp(881,1): message : see reference to class template instantiation 'boost::range_detail_microsoft::list_iterator' being compiled
1> with
1> [
1> X=CPtrList
1> ]

The project is compiled with /std:c++20 switch.

This is easily reproducible - it is just needed to create a C++ console application, add the include to to one cpp file, add boost directory to include directories and set the compiler flag /std:c++20.

I'm using boost 1.81.

Best regards,
Gabriel

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.