Skip to content

te::call compile error under windows environment #45

@zyzyz

Description

@zyzyz

Expected Behavior

te.hpp file compiles in a project using Windows SDK

Actual Behavior

te::call has a compile error

struct Drawable : te::poly<Drawable> {
    using te::poly<Drawable>::poly;

    void draw(std::ostream &out) const {
        te::call([](auto const &self, auto &out) { self.draw(out); }, *this, out);
                                                                             ~~~
    }
};
constexpr auto call(
  const TExpr expr,
  const I &interface,
           ~~~~~~~~~
  Ts &&... args)
{...}

argument interface is recognized as macro defined in combaseapi.h, changing to other naming compiles.

Adjusting including order or using precompiled header might help, but considering interface is a common keyword, it is expected to change the argument naming for better compatibility.

Specifications

  • Version: Visual Studio 2022 (v143), /std:c++20, /std:c17
  • Platform: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions