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

The Rest: Listing 30, no viable constructor for mixture_pdf #608

Closed
D-K-E opened this issue May 20, 2020 · 0 comments
Closed

The Rest: Listing 30, no viable constructor for mixture_pdf #608

D-K-E opened this issue May 20, 2020 · 0 comments
Assignees
Milestone

Comments

@D-K-E
Copy link

D-K-E commented May 20, 2020

Book The Rest: Listing 30, mixture_pdf takes shared_ptr in constructor, but these are not provided.
The original:

hittable_pdf p0(light_ptr, rec.p);

cosine_pdf p1(rec.normal);
mixture_pdf p(&p0, &p1);

compiled version with clang 5+:

auto p0 = make_shared<hittable_pdf>(light_ptr, rec.p);
auto p1 = make_shared<cosine_pdf>(rec.normal);
mixture_pdf p(p0, p1);

problem persists in dev-major/minor/patch branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants