Skip to content

Explicit specialization needed for cpp14_promoted<long double, long double> #11

Description

@rcorden-perforce

Hi,

The partial specializations provided for cpp14_promoted in cx_math.h (https://github.com/elbeno/constexpr/blob/master/src/include/cx_math.h#L872) are ambiguous.

This can also be seen by testing with some main stream compilers: https://godbolt.org/z/rGfcGzKfh

The easiest fix is to provide an explicit specialization for when the types are both long double:

  template <  >
  struct cpp14_promoted < long double , long double >
  {
    using type = long double ;
  } ;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions