Skip to content

Discuss and remove std::is_floating_point specialization #765

@sdebionne

Description

@sdebionne

Just so that this discussion doesn't get lost -event if #764 seems to fix the compile issue.

The only place where is_floating_point is used within GIL seems to be the TIFF I/O extension, and there it's only an implementation detail: https://github.com/boostorg/gil/blob/688acf78f7fc4ecb5b1c6f1e4a8f4a5939d28e9b/include/boost/gil/extension/io/tiff/detail/is_allowed.hpp#L101C13-L101C30

Furthermore I'm a bit worried, because cppreference.com states:

If the program adds specializations for std::is_floating_point or std::is_floating_point_v, the behavior is undefined.

Doesn't sound like this is something one should do. As long as those lines were in the boost namespace (before the PR), that was not a specialization of std::is_floating_point but boost::is_floating_point, a different thing - although probably with similar intentions. But with the move to the std namespace it now is a specialization.

Originally posted by @striezel in #761 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions