Skip to content

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

@D-K-E

Description

@D-K-E

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions