Skip to content

<memory>: ranges::uninitialized_copy and ranges::uninitialized_move fail to compile with trivial types #1712

@AdamBucior

Description

@AdamBucior

Describe the bug
ranges::uninitialized_copy and ranges::uninitialized_move fail to compile with trivial types, common first range and non-common second range.

Code

#include <memory>
#include <ranges>

using namespace std;

int main() {
    int arr[3]{0, 1, 2};
    int arr2[3];

    ranges::uninitialized_copy(begin(arr), end(arr), begin(arr2), unreachable_sentinel);
}

Expected behavior
Should compile fine.

STL version
Microsoft Visual Studio Community 2019 Preview
Version 16.10 Preview 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!rangesC++20/23 ranges

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions