23 Ranges library [ranges]

23.4 Range primitives [range.prim]

23.4.3 data [range.prim.data]

The name data denotes a customization point object.
The expression ranges::data(E) for some subexpression E is expression-equivalent to:
  • If E is an lvalue, decay-copy(E.data()) if it is a valid expression of pointer to object type.
  • Otherwise, if ranges::begin(E) is a valid expression whose type models ContiguousIterator,
      ranges::begin(E) == ranges::end(E) ? nullptr : addressof(*ranges::begin(E))
      
    except that E is evaluated only once.
  • Otherwise, ranges::data(E) is ill-formed.
    [Note
    :
    This case can result in substitution failure when ranges::data(E) appears in the immediate context of a template instantiation.
    end note
    ]
[Note
:
Whenever ranges::data(E) is a valid expression, it has pointer to object type.
end note
]