-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Prevent make_span from working with vectors and arrays of pointers
#8735
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
Prevent make_span from working with vectors and arrays of pointers
#8735
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Some people (including me, to be honest) use spans almost whenever they could, so it's better to make |
|
@aardappel @dbaileychess what do you think of it? |
|
I agree such an illegal conversion should not be possible, so disabling it is better than nothing. Ideally it be converted to And looks like CI wants some parentheses to clarify precedence. |
I've made it possible via
It is just |
No, the actual error is Besides that, you'll need to modify this such that the version using |
My bad: fixed. Seems like it's more convenient to use |
|
Thanks! |
The goal is to fix the problem with a confusing behaviour of
flatbuffers::make_spanwithflatbuffers::Vector<(const)? T*>.Consider the following flatbuffers schema:
and some code working with it: