Googletest: Template depth has grown significantly

Created on 19 Oct 2018  Â·  6Comments  Â·  Source: google/googletest

The spriv-tools build started to fail because template nesting depth has grown. We use to pass with a limit of 256 (I don't know the min), but now we require at least 629. See https://github.com/KhronosGroup/SPIRV-Tools/issues/1994.

It seems like somebody is aware of this because I see a commit that adds -ftemplate-depth=512 to the travis builds.

Is anything else going to be done about this?

Most helpful comment

On Fri, Oct 19, 2018 at 11:22 AM Steven Perron notifications@github.com
wrote:

The spriv-tools build started to fail because template nesting depth has
grown. We use to pass with a limit of 256 (I don't know the min), but now
we require at least 629. See KhronosGroup/SPIRV-Tools#1994
https://github.com/KhronosGroup/SPIRV-Tools/issues/1994.

It seems like somebody is aware of this because I see a commit that adds
-ftemplate-depth=512 to the travis builds.

Is anything else going to be done about this?

Yes. This seems to be a side effect of using std::tuple for some of the
variadic-vs-pump cleanup that is happening.
We are looking into an alternative that does not use std::tuple to avoid
this. std::tuple is not particularly thrifty with template instantiation
depth.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/googletest/issues/1921, or mute the thread
https://github.com/notifications/unsubscribe-auth/ANcRPbh3MU3Q9zZJ_VCmRSdE1-j2R24Sks5ume5NgaJpZM4Xwktv
.

All 6 comments

I see that the .travis.yml has been updated to increase the template limit. Instead, I think the limit should be applied inside googletests's own CMake files. That way all downstream projects won't have to add the option.

On Fri, Oct 19, 2018 at 11:22 AM Steven Perron notifications@github.com
wrote:

The spriv-tools build started to fail because template nesting depth has
grown. We use to pass with a limit of 256 (I don't know the min), but now
we require at least 629. See KhronosGroup/SPIRV-Tools#1994
https://github.com/KhronosGroup/SPIRV-Tools/issues/1994.

It seems like somebody is aware of this because I see a commit that adds
-ftemplate-depth=512 to the travis builds.

Is anything else going to be done about this?

Yes. This seems to be a side effect of using std::tuple for some of the
variadic-vs-pump cleanup that is happening.
We are looking into an alternative that does not use std::tuple to avoid
this. std::tuple is not particularly thrifty with template instantiation
depth.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/googletest/issues/1921, or mute the thread
https://github.com/notifications/unsubscribe-auth/ANcRPbh3MU3Q9zZJ_VCmRSdE1-j2R24Sks5ume5NgaJpZM4Xwktv
.

We are looking into an alternative ...

Would you accept a patch that applied the template limit increase inside the CMake files? (I don't have a patch yet, but I'm considering it.)

We are actively working on a change that should make the template depth tweak unnecessary
Stay tuned

@dneto0 In the meantime yes please propose the template limit increase inside the CMake files fix it is useful regardless
Thank you!

Fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

octoploid picture octoploid  Â·  3Comments

markfrazzetto picture markfrazzetto  Â·  3Comments

Joebeazelman picture Joebeazelman  Â·  5Comments

tschijnmo picture tschijnmo  Â·  4Comments

marknelson picture marknelson  Â·  4Comments