#include <boost/range/mfc.hpp> causes a compilation error
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Reproduce the failure in a small C++ console application using Boost 1.81, /std:c++20, and <boost/range/mfc.hpp>. Start with boost/range/detail/microsoft.hpp around lines 624-626 and use the diagnostics from boost/range/mfc.hpp line 881 to trace the iterator instantiation. Done means the include compiles successfully with the reported compiler configuration.
Written by the indexing model from the issue text.
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 <boost/range/mfc.hpp>:
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<const X,const void *,boost::use_default,boost::use_default>::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<const X,const void *,boost::use_default,boost::use_default>::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<const X,const void *,boost::use_default,boost::use_default>' 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 <boost/range/mfc.hpp> 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
- Dominant language
- C++
- Stars
- 45
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/range
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Bad is_sorted docsOpen
Difficulty 1/5 Under an hour Newbie friendliness 55/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
shadps4-emu/shadps4-qtlauncher#453 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/differential-privacy#516 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
plengauer/DXGIOutputDuplication#76 ·
Maintainers usually reply within 1 day
-
Feature
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Narezzurri/OpenVPN-Config-Manager#95 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rhalbersma/xstd-bits#314 ·
Maintainers usually reply within 1 day