Skip to content

2.0.200115.8 causing compiler errors #473

@Zofware

Description

@Zofware

I upgraded my CppWinRT project from 2.0.191217.1 to 2.0.200115.8 today and now I'm getting some compiler errors. Looks like the max macro strikes again.

\Generated Files\winrt\base.h(2635,61): warning C4003: not enough arguments for function-like macro invocation 'max'
\Generated Files\winrt\base.h(2635,61): error C2589: '(': illegal token on right side of '::'
\Generated Files\winrt\base.h(2635,12): error C2062: type 'unknown-type' unexpected
\Generated Files\winrt\base.h(2635,66): error C2059: syntax error: ')'
\Generated Files\winrt\base.h(2636,9): error C2143: syntax error: missing ';' before '{'
\Generated Files\winrt\base.h(3228,13): warning C4003: not enough arguments for function-like macro invocation 'max'
\Generated Files\winrt\base.h(3228,13): error C2589: '(': illegal token on right side of '::'
\Generated Files\winrt\base.h(3228,1): error C2062: type 'unknown-type' unexpected
\Generated Files\winrt\base.h(3228,1): error C2059: syntax error: ')'

Here is line 2635 with some context.

WINRT_EXPORT namespace winrt::param
{
    struct hstring
    {
...
    private:
        void create_string_reference(wchar_t const* const data, size_t size) noexcept
        {
-->         WINRT_ASSERT(size < std::numeric_limits<uint32_t>::max());
...
    };
...
}

Metadata

Metadata

Assignees

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