Date
2021-06-07.16:58:04
Message id
11882

Content

Proposed resolution:

This wording is relative to N4885.

  1. Modify [expos.only.func] as indicated:

    -2- The following are defined for exposition only to aid in the specification of the library:

    namespace std {
      template<class T> constexpr decay_t<T> decay-copy(T&& v)
          noexcept(is_nothrow_convertible_v<T, decay_t<T>>) // exposition only
        { return std::forward<T>(v); }
        
      constexpr auto synth-three-way =
        []<class T, class U>(const T& t, const U& u)
          requires requires {
          { t < u } -> boolean-testable;
          { u < t } -> boolean-testable;
          }
        {
          if constexpr (three_way_comparable_with<T, U>) {
            return t <=> u;
          } else {
            if (t < u) return weak_ordering::less;
            if (u < t) return weak_ordering::greater;
            return weak_ordering::equivalent;
          }
        };
    
      template<class T, class U=T>
      using synth-three-way-result = decltype(synth-three-way(declval<T&>(), declval<U&>()));
    }
    
  2. Modify [contents] as indicated:

    -3- Whenever a name x defined in the standard library is mentioned, the name x is assumed to be fully qualified as ::std::x, unless explicitly described otherwise. For example, if the Effects: element for library function F is described as calling library function G, the function ::std::G is meant. Whenever an unqualified name x is used in the specification of a declaration D in clauses 16-32 or Annex D, its meaning is established as-if by performing unqualified name lookup ([basic.lookup.unqual]) in the context of D. [Note ?: Argument-dependent lookup is not performed. — end note] Similarly, the meaning of a qualified-id is established as-if by performing qualified name lookup ([basic.lookup.qual]) in the context of D. [Example: The reference to is_array_v in the specification of std::to_array ([array.creation]) refers to ::std::is_array_v. — end example] [Note ?: Operators in expressions ([over.match.oper]) are not so constrained; see [global.functions]. — end note]

  3. Modify [range.subrange.general] as indicated:

    template<class T>
      concept pair-like =              // exposition only
        !is_reference_v<T> && requires(T t) {
          typename tuple_size<T>::type; // ensures tuple_size<T> is complete
          requires derived_from<tuple_size<T>, integral_constant<size_t, 2>>;
          typename tuple_element_t<0, remove_const_t<T>>;
          typename tuple_element_t<1, remove_const_t<T>>;
          { std::get<0>(t) } -> convertible_to<const tuple_element_t<0, T>&>;
          { std::get<1>(t) } -> convertible_to<const tuple_element_t<1, T>&>;
        };
    
  4. Modify [range.elements.view] as indicated:

    template<class T, size_t N>
      concept has-tuple-element = // exposition only
        requires(T t) {
          typename tuple_size<T>::type;
          requires N <tuple_size_v<T>;
          typename tuple_element_t<N, T>;
          { std::get<N>(t) } -> convertible_to<const tuple_element_t<N, T>&>;
        };
    
  5. Modify [range.elements.iterator] as indicated:

    -2- The member typedef-name iterator_category is defined if and only if Base models forward_range. In that case, iterator_category is defined as follows: […]

    1. (2.1) — If std::get<N>(*current_) is an rvalue, iterator_category denotes input_iterator_tag.

    2. […]

    static constexpr decltype(auto) get-element(const iterator_t<Base>& i); // exposition only
    

    -3- Effects: Equivalent to:

    if constexpr (is_reference_v<range_reference_t<Base>>) {
      return std::get<N>(*i);
    } else {
      using E = remove_cv_t<tuple_element_t<N, range_reference_t<Base>>>;
      return static_cast<E>(std::get<N>(*i));
    }
    
  6. Remove [fs.req.namespace] in its entirety:

    29.11.3.2 Namespaces and headers [fs.req.namespace]

    -1- Unless otherwise specified, references to entities described in subclause [filesystems] are assumed to be qualified with ::std::filesystem::.