This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.

3045. atomic<floating-point> doesn't have value_type or difference_type

Section: 32.6.3 [atomics.types.float] Status: WP Submitter: Tim Song Opened: 2017-12-11 Last modified: 2018-03-24

Priority: 0

View all issues with WP status.

Discussion:

The atomic<floating-point> specialization doesn't have the value_type and difference_type member typedefs, making it unusable with most of the nonmember function templates. This doesn't seem to be the intent.

[ 2018-01-09 Moved to Tentatively Ready after 6 positive votes on c++std-lib. ]

[2018-3-17 Adopted in Jacksonville]

Proposed resolution:

This wording is relative to N4713.

  1. Edit 32.6.3 [atomics.types.float] after p1, class template specialization atomic<floating-point> synopsis, as indicated:

      namespace std {
        template<> struct atomic<floating-point> {
          using value_type = floating-point;
          using difference_type = value_type;
          static constexpr bool is_always_lock_free = implementation-defined;
          […]
        };
      }