[CXX-1282] collection::name() should not guarantee returned string is null-terminated Created: 22/Mar/17 Updated: 22/Mar/17 Resolved: 22/Mar/17 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | API, Documentation, Implementation |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Minor Change |
| Description |
|
The current documentation for collection::name() is as follows:
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. |
| Comments |
| Comment by Githook User [ 22/Mar/17 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: |
| Comment by David Golden [ 22/Mar/17 ] |
|
I think we can leave this in. |
| Comment by J Rassi [ 22/Mar/17 ] |
|
david.golden, I've marked this ticket as a minor backwards-breaking change, since it is no longer valid for applications to rely on the property that the return value of this method is null-terminated (as we are removing the relevant guarantee from our documentation). Let me know if you think we should kick this out to "Future API change release" as a result. |