Skip to content

std::wstring argument order #12631

@Ericson2314

Description

@Ericson2314

I now see

../src/libutil/windows/environment-variables.cc:17:24: warning: narrowing conversion of ‘bufferSize’ from ‘DWORD’ {aka ‘long unsigned int’} to ‘wchar_t’ [-Wnarrowing]
   17 |     std::wstring value{bufferSize, L'\0'};

in Windows builds, but in 355f08a we explicitly flipped it to fix a Clang MinGW warning.

Does the right argument order depend on the C++ standard library implementation? What is going on!

CC @puffnfresh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions