Skip to content

Fermion/Boson statistic uses old-style enum #989

Open

Description

@jcoulter12

It is possible for the following to compile (obviously wrong, but an easy typo to make):

auto w_mesh = mesh::refreq{beta, triqs::gfs::Fermion, n_w};

because triqs::gfs::Fermion is taken as an int -> double.

As commented by @parcollet, this kind of thing might be avoided by changing:
enum statistic_enum { Boson = 0, Fermion = 1 };
to
enum class statistic_enum { Boson = 0, Fermion = 1 };

but this would also be a somewhat irritating update because Fermion -> statistic_enum::Fermion.

Opening an issue not to suggest it for an immediate change, but to register this as something to keep in consideration.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions