Skip to content

error: identifier '_mpz' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] 2163 | inline mpz_class operator"" _mpz(const char* s) #111

Description

@yurivict
In file included from /usr/ports/math/libpoly/work/libpoly-0.2.1/test/polyxx/test_assignment.cpp:2:
In file included from /usr/ports/math/libpoly/work/libpoly-0.2.1/include/polyxx.h:5:
In file included from /usr/ports/math/libpoly/work/libpoly-0.2.1/include/polyxx/algebraic_number.h:6:
In file included from /usr/ports/math/libpoly/work/libpoly-0.2.1/include/polyxx/dyadic_interval.h:6:
In file included from /usr/ports/math/libpoly/work/libpoly-0.2.1/include/polyxx/dyadic_rational.h:6:
In file included from /usr/ports/math/libpoly/work/libpoly-0.2.1/include/polyxx/integer.h:3:
/usr/local/include/gmpxx.h:2163:29: error: identifier '_mpz' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
 2163 | inline mpz_class operator"" _mpz(const char* s)
      |                  ~~~~~~~~~~~^~~~
      |                  operator""_mpz
/usr/local/include/gmpxx.h:2168:29: error: identifier '_mpq' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
 2168 | inline mpq_class operator"" _mpq(const char* s)
      |                  ~~~~~~~~~~~^~~~
      |                  operator""_mpq
/usr/local/include/gmpxx.h:2175:29: error: identifier '_mpf' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
 2175 | inline mpf_class operator"" _mpf(const char* s)
      |                  ~~~~~~~~~~~^~~~
      |                  operator""_mpf
3 errors generated.

The errors can be converted to warnings with -Wno-error=deprecated-literal-operator.

Please fix this.

Version: 0.2.1
clang-21.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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