Skip to content

Including only any_range.hpp of Boost 1.89 fails in const_reference_type_generator #161

@brandl-muc

Description

@brandl-muc

Including <boost/range/any_range.hpp> leads to the following compiler error(s) when compiling with MSVC 17.14.9:

1>------ Build started: Project: BoostAnyRange, Configuration: Debug x64 ------
1>BoostAnyRange.cpp
1>D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(30,26): error C2146: syntax error: missing '>' before identifier 'add_const'
1>(compiling source file 'BoostAnyRange.cpp')
1>    D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(30,26):
1>    the template instantiation context (the oldest one first) is
1>        D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(26,16):
1>        while compiling class template 'boost::range_detail::const_reference_type_generator'
1>D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(30,35): error C2947: expecting '>' to terminate template-argument-list, found '<'
1>(compiling source file 'BoostAnyRange.cpp')
1>D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(28,30): error C2062: type '<error type>' unexpected
1>(compiling source file 'BoostAnyRange.cpp')
1>D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(32,20): error C2039: 'type': is not a member of '`global namespace''
1>(compiling source file 'BoostAnyRange.cpp')
1>D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(34,16): error C2039: 'type': is not a member of '`global namespace''
1>(compiling source file 'BoostAnyRange.cpp')
1>D:\Projects\SO\EOSLibsInventoy\out\build\v143-x64-debug-ninja-vcpkg\vcpkg_installed\x64-windows-v143\include\boost\range\detail\any_iterator_interface.hpp(34,25): error C2238: unexpected token(s) preceding ';'
1>(compiling source file 'BoostAnyRange.cpp')
1>Done building project "BoostAnyRange.vcxproj" -- FAILED.

The error happens independent of the /std:c++ language standard used. This works with Boost 1.67.0 without any other changes.

A MRE would be this:

#include <boost/range/any_range.hpp>

int main()
{}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions