Skip to content
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

Fixed a Visual Studio 2017 build error. (#4488) #4517

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

rcane
Copy link
Contributor

@rcane rcane commented Apr 16, 2018

The current 15.6.x versions of Visual Studio 2017 contain a bug that
prevent them from compiling the following construct under certain
conditions:

std::unique_ptr<std::unique_ptr []> foos;

This will fail to compile if Foo is an abstract class. To work-around
the problem the whole construct was change into:

std::vector<std::unique_ptr> foos;

This not only fixes the compiler error but is also more readable than
previous version.

The current 15.6.x versions of Visual Studio 2017 contain a bug that
prevent them from compiling the following construct under certain
conditions:

std::unique_ptr<std::unique_ptr<Foo> []> foos;

This will fail to compile if Foo is an abstract class. To work-around
the problem the whole construct was change into:

std::vector<std::unique_ptr<Foo>> foos;

This not only fixes the compiler error but is also more readable than
previous version.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@rcane
Copy link
Contributor Author

rcane commented Apr 16, 2018

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@acozzette
Copy link
Member

ok to test (this comment will trigger some other CI runs)

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Apr 16, 2018

@acozzette Jenkins has been turned down already so we no longer need to reply "ok to test" to trigger those tests. The kokoro tests use a different trigger: the "kokoro:run" label. You just need to apply the label and kokro will pick it up (and remove the label so you can lable it again to trigger another run if needed).

@acozzette acozzette merged commit 9497a65 into protocolbuffers:master Apr 16, 2018
@xfxyjwf xfxyjwf added the c++ label Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants