Skip to content

Handle null callable targets in cl::function #9

Description

@vshalygin

This issue was identified during a Codex code review.

Constructing cl::function from a null function pointer or null member-function pointer currently creates an apparently non-empty function. Invoking it then results in undefined behavior instead of throwing std::bad_function_call.

Empty std::function targets also remain wrapped as apparently non-empty objects.

Normalize supported null and empty callable targets to the empty cl::function state and add regression tests.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions