Skip to content

bool_constant: std::(true|false)_typeはC++11から #67

Description

@ToruNiina

060-bool-constantで、

今までintegral_constantを使っていた場面で特にboolだけが必要な場面では、C++17以降は単にstd::true_typeかstd::false_typeと書くだけでよくなる。

とありますが、std::true_typeとstd::false_type自体はC++11から存在したはずなので(N3337 20.9.3)、ここは「std::bool_constant</* value */>と書くだけでよくなる」ではないでしょうか。

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