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

member with constructor not allowed in anonymous aggregate, when compiling in DEBUG mode #52

Closed
emilioj opened this issue Dec 12, 2015 · 2 comments

Comments

@emilioj
Copy link

emilioj commented Dec 12, 2015

Hi!

I'm trying to build a DEBUGGING version of pbrt-v3 in GNU/Linux (g++ 5.3, but tried older versions).

I obtain errors regarding the 'struct { EndpointInteraction ei; MediumInteraction mi; SurfaceInteraction si; };' in bdpt.h, since members with constructors and copy assigment operators are not allowed in anonymous structs in C++

Release mode is Ok since a union is used instead of the struct.

@jonasdeyson
Copy link

Same problem here with g++ 4.8.4.

mmp added a commit that referenced this issue Apr 8, 2016
This seems to be what we need to make compilers happy with non-POD types in the anonymous union. (Tested on a range of compilers that previously failed with this.)

Issues #8, #52, #5.
@mmp
Copy link
Owner

mmp commented Apr 8, 2016

This should be fixed now. (Sorry it took a while.) Please reopen this if it's not working for you now.

@mmp mmp closed this as completed Apr 8, 2016
LarsPh pushed a commit to LarsPh/deepscattering-pbrt that referenced this issue Apr 20, 2020
This seems to be what we need to make compilers happy with non-POD types in the anonymous union. (Tested on a range of compilers that previously failed with this.)

Issues mmp#8, mmp#52, mmp#5.
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

No branches or pull requests

3 participants