Skip to content

Remove U macro definition from public headers #1805

Open
@aminya

Description

@aminya

Cpprest does some questionable macro definitions here.
microsoft/cpprestsdk@411a109/Release/include/cpprest/details/basic_types.h#L87

The U Macro overrides the U typename in fmt causing fmt not to work. This definition is like a time-bomb waiting to cause problems anytime.

  template <typename T, typename U = format_as_t<T>,
            FMT_ENABLE_IF(std::is_arithmetic<U>::value)>
  FMT_MAP_API auto map(const T& val) -> decltype(FMT_DECLTYPE_THIS map(U())) {
    return map(format_as(val));
  }

Related fmtlib/fmt#4180

Can you remove this macro?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aminya

        Issue actions

          Remove `U` macro definition from public headers · Issue #1805 · microsoft/cpprestsdk