Skip to content

MSVC 19.44 ( VS 2022 ) with C++20/C++23 mode compilation error #221

@voivoid

Description

@voivoid

Latest MSVC 19.44 ( Visual Studio 2022, 17.14 ) fails to compile basic code:

#include <boost/parser/parser.hpp>

int main() {
    return 0;
}

with the following error:

F:\Libs\boost\boost/parser/detail/text/transcode_view.hpp(164): error C2143: syntax error: missing ';' before '<'

Steps to reproduce:

cl /I"F:\Libs\boost" /std:c++20 ./main.cpp

( though everything is fine with /std:c++17 )

MSVC info:

>cl --version
Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35109.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

Note that a change of the following line

using sentinel = project_view<V, F>::sentinel<Const>;

to

using sentinel = project_view<V, F>::template sentinel<Const>;

Fixes the issue for me

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