Skip to content

Make the template for string_view instantiate as raw_string_view.#629

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_878107358
Open

Make the template for string_view instantiate as raw_string_view.#629
copybara-service[bot] wants to merge 1 commit intomainfrom
test_878107358

Conversation

@copybara-service
Copy link

Make the template for string_view instantiate as raw_string_view.

This doesn't solve preferred_name in general:

  1. std::string needs work because we can't hardcode the build-specific __u in string_wrapper. So first need to strip the inline namespace when stringifying the type names for the standard library.
  2. std::pmr::string doesn't work, and I don't know why. It looks as if when we look at the template specialization, it's fully concrete, but when we look at the type alias, it doesn't point at a complete type. That doesn't make sense to me. So, something is wrong, but idk what.

Still, I believe this is approximately the right approach and will generalize to all of these types with time.

Disclosure: some AI was used at the start and at one point during the middle but man it choked hard, and I believe everything here is hand-written (but can't be 100% sure).

This doesn't solve preferred_name in general:

1. std::string needs work because we can't hardcode the build-specific `__u` in string_wrapper. So first need to strip the inline namespace when stringifying the type names for the standard library.
2. std::pmr::string doesn't work, and I don't know why. It looks as if when we look at the template specialization, it's fully concrete, but when we look at the type alias, it doesn't point at a complete type. That doesn't make sense to me. So, something is wrong, but idk what.

Still, I believe this is approximately the right approach and will generalize to all of these types with time.

Disclosure: some AI was used at the start and at one point during the middle but man it choked hard, and I believe everything here is hand-written (but can't be 100% sure).
PiperOrigin-RevId: 878107358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant