range-v3
range-v3 copied to clipboard
RANGE_SATISFY_BOOST_RANGE `common_view` does not work because of non-type template parameter
The attempt in the common.hpp that tries to make common_view
to satisfy Boost.Range concept failed.
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/common.hpp#L242
The macro RANGES_SATISFY_BOOST_RANGE
was expecting the view only has typename template parameters,
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/detail/satisfy_boost_range.hpp#L51
but common_view
has a non-type template parameter
These are all of the views with non-type template parameters that try to use RANGES_SATISFY_BOOST_RANGE (but don't work due to the non-type template parameter)
::ranges::any_view
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/any_view.hpp#L548-L549
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/any_view.hpp#L691
::ranges::common_view
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/common.hpp#L58-L59
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/common.hpp#L242
::ranges::cycled_view
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/cycle.hpp#L46-L47
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/cycle.hpp#L250
::ranges::detail::take_exactly_view_
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/take_exactly.hpp#L50-L52
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/view/take_exactly.hpp#L205
Thanks for the report. I wonder how this compiles at all. :-/
[..] I wonder how this compiles at all. :-/
cause, (un?)fortunately all current views happen to have non-type args with defaults :)
@ericniebler There is a different issue but to do with boost. the satisfy_boost_range.hpp assumes the namespace is called boost
https://github.com/ericniebler/range-v3/blob/0487cca29e352e8f16bbd91fda38e76e39a0ed28/include/range/v3/detail/satisfy_boost_range.hpp#L24
But boost allows the users to rename the namespace to something else, e.g. my_boost
, and make boost
an alias to my_boost
https://www.boost.org/doc/libs/1_77_0/tools/bcp/doc/html/index.html
satisfy_boost_range.hpp doesn't work well with that feature because namespace boost
won't compile
I don't think there is much I can do about that second issue.
I don't think there is much I can do about that second issue.
a build time config, or that along with a macro RANGE_BOOST_NAMESPACE?