collection::name() should not guarantee returned string is null-terminated

XMLWordPrintableJSON

    • None
    • Minor Change
    • None
    • None
    • None
    • None
    • None
    • None

      The current documentation for collection::name() is as follows:

      508     ///
      509     /// Returns the name of this collection as a view of a null-terminated string.
      510     ///
      511     /// @return The name of the collection.
      512     ///
      513     stdx::string_view name() const;
      

      It's generally not appropriate to pass around stdx::string_view objects with annotations of the fact that the underlying string is null-terminated, since this knowledge is hidden from the type system. Documenting to users that this string is null-terminated also limits the ability of authors to add performance optimizations to this function in the future. We should remove this note from our public-facing documentation, and update our implementation to improve clarity where this function is used.

              Assignee:
              J Rassi (Inactive)
              Reporter:
              J Rassi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: