Skip to content

Consider not making FMT_USE_USER_DEFINED_LITERALS enabled by default #1148

Closed
@merryhime

Description

@merryhime

This produces a warning under -Wpendantic on GCC 9.1. The feature this depends upon is non-standard. Unfortunately ISO C++ did not adopt the use of string literal operator templates taking a character pack.

Activity

changed the title [-]Consider not making FMT_USE_USER_DEFINED_LITERALS [/-] [+]Consider not making FMT_USE_USER_DEFINED_LITERALS enabled by default[/+] on May 7, 2019
vitaut

vitaut commented on May 8, 2019

@vitaut
Contributor

This is somewhat problematic because it will be a breaking change. However, you can disable user-defined literals by defining FMT_USE_USER_DEFINED_LITERALS to 0 when including {fmt}.

vitaut

vitaut commented on May 11, 2019

@vitaut
Contributor

Actually disabling just UDL templates on GCC 9 by default should be fine because it will fallback to runtime checks. Done in a6e8ed1.

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @vitaut@merryhime

      Issue actions

        Consider not making FMT_USE_USER_DEFINED_LITERALS enabled by default · Issue #1148 · fmtlib/fmt