Skip to content

Clarify std::string ownership in core APIs#1280

Open
bhack wants to merge 2 commits intometa-pytorch:mainfrom
bhack:codex/string-vs-string-cleanup
Open

Clarify std::string ownership in core APIs#1280
bhack wants to merge 2 commits intometa-pytorch:mainfrom
bhack:codex/string-vs-string-cleanup

Conversation

@bhack
Copy link
Copy Markdown

@bhack bhack commented Mar 9, 2026

Closes #1256

This makes the std::string vs std::string_view split explicit in the core C++ APIs.

Policy:

  • use std::string for owned or stored values
  • use std::string_view only for borrow-only parsing and lookup helpers
  • use std::string at FFmpeg C-string boundaries

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 9, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1280

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 9, 2026
@bhack bhack force-pushed the codex/string-vs-string-cleanup branch from 0fee817 to f4db5e6 Compare March 10, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleaning up uses of std::string vs std::string_view

1 participant