Skip to content

[Build] Use C++17 Constructor for tiktoken.cpp when C++20 is unavailable #5025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

python3kgae
Copy link
Contributor

The basic_string_view constructor:

template< class It, class End >
constexpr basic_string_view( It first, End last );

requires C++20.

To allow the code to compile with C++17, use the basic_string_view constructor:

constexpr basic_string_view( const CharT* s, size_type count );

when C++20 is not available

For #4661

The basic_string_view constructor:
```
template< class It, class End >
constexpr basic_string_view( It first, End last );
```
requires C++20.

To allow the code to compile with C++17, use the basic_string_view constructor:
```
constexpr basic_string_view( const CharT* s, size_type count );
```

For pytorch#4661
Copy link

pytorch-bot bot commented Aug 31, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5025

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

✅ No Failures

As of commit baa7067 with merge base 37cad01 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 31, 2024
@cccclai cccclai requested a review from larryliu0820 September 3, 2024 17:46
@cccclai
Copy link
Contributor

cccclai commented Sep 3, 2024

Seems fine to me, will wait for CI signal

@larryliu0820
Copy link
Contributor

Can you click the "Squash and merge" button with a good commit message? We are testing out landing PRs from GH.

@python3kgae
Copy link
Contributor Author

Can you click the "Squash and merge" button with a good commit message? We are testing out landing PRs from GH.

Don't have write access :(
Here's the commit message.

[Build] Use C++17 Constructor for basic_string_view in tiktoken.cpp when C++20 is unavailable

The basic_string_view constructor:

template< class It, class End >
constexpr basic_string_view( It first, End last );

requires C++20.

To allow the code to compile with C++17, use the basic_string_view constructor:

constexpr basic_string_view( const CharT* s, size_type count );

when C++20 is not available

For #4661

@kirklandsign
Copy link
Contributor

Can you click the "Squash and merge" button with a good commit message? We are testing out landing PRs from GH.

Don't have write access :( Here's the commit message.

[Build] Use C++17 Constructor for basic_string_view in tiktoken.cpp when C++20 is unavailable

The basic_string_view constructor:

template< class It, class End >
constexpr basic_string_view( It first, End last );

requires C++20.

To allow the code to compile with C++17, use the basic_string_view constructor:

constexpr basic_string_view( const CharT* s, size_type count );

when C++20 is not available

For #4661

Thank you for the feedback! We will update the rules on our side and let you know

@kirklandsign
Copy link
Contributor

Seems that currently we need reviewers to merge the commit. I will do it.

@kirklandsign kirklandsign merged commit 89829b5 into pytorch:main Sep 5, 2024
36 checks passed
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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants