include/boost/iostreams/device/mapped_file.hpp 349 visibility problems
- Dominant language
- C
- Stars
- 48
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
For time reason I cound not do more testing, but in boost 1.75.0, look like there is a conflict in visibility.
/home/i-bird/openfpm_dependencies_clang/BOOST/include/boost/iostreams/device/mapped_file.hpp:349:53: error: 'safe_bool_helper' is a private member of 'boost::iostreams::mapped_file_source'
using mapped_file::operator int mapped_file_source::safe_bool_helper::*;
^
/home/i-bird/openfpm_dependencies_clang/BOOST/include/boost/iostreams/device/mapped_file.hpp:155:8: note: implicitly declared private here
struct safe_bool_helper { int x; };
... Looking at the code as reported by the compiler ... I have the tendency to give right to the compiler. On another note I have to admit I compiled BOOST with many compilers gcc nvcc clang and this is the first time I saw this error. It happen with the combo nvcc 11.2 + clang with underlying compiler
The warkaround was to move the line under
typedef int safe_bool_helper::* safe_bool;
into the public section
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in include/boost/iostreams/device/mapped_file.hpp around lines 155 and 349, where safe_bool_helper is declared and referenced. Reproduce the visibility error with the reported nvcc 11.2 and clang combination, then verify the workaround's visibility placement and compile successfully without the private-member diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100