Skip to content

unrecoverable error importing module 'std' with std::ranges::views::pairwise_transform #4404

Description

I ran into the following in VS 17.10.0 Preview 1.0, I have not tested to see if this is a regression or new.
The following code

import std;
//#include <ranges>
//#include <vector>

void main( )
{
    std::vector<double> points { 1.6, 2.6, 99.9 };

    auto fn = []( double a, double b ) -> double
    {
        return a + b ;
    };

    auto x = points | std::ranges::views::pairwise_transform( fn );

    auto y = std::ranges::to<std::vector>( x );
}

compiles fine and does what I expect when I use the #includes however when I switch to the import std; i get

C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.40.33521\include\ranges(8957,9): error C1116: unrecoverable error importing module 'std'.  Specialization of 'std::invoke_result_t' with arguments '_Fn, _Ty...'

Hopefully this is already fixed by the upcoming stuff in #1694 but I'm not really able to tell.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!modulesC++23 modules, C++20 header units

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions