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

Implement #70 #71

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Implement #70 #71

merged 3 commits into from
Aug 20, 2024

Conversation

n0F4x
Copy link
Contributor

@n0F4x n0F4x commented Aug 19, 2024

Check for function provided to and_then returning optional type is missing

n0F4x added 2 commits August 19, 2024 19:17
- missing check that function provided for `and_then` returns an optional type
- improved function call with `std::invoke`

-also fixes test cases where `quat::value_ptr` wasn't renamed to `quat::data`
@n0F4x n0F4x changed the title Implement #70 Fix #70 Aug 19, 2024
@n0F4x n0F4x changed the title Fix #70 Implement #70 Aug 19, 2024
@n0F4x
Copy link
Contributor Author

n0F4x commented Aug 19, 2024

GCC's implementation of the and_then function parameter returns optional check:

template<typename _Tp>
    inline constexpr bool __is_optional_v = false;
template<typename _Tp>
    inline constexpr bool __is_optional_v<optional<_Tp>> = true;

We should support both std::optional and fastgltf::OptionalWithFlagValue. But I wasn't sure what style would be ideal - this is a header file after all.

include/fastgltf/types.hpp Show resolved Hide resolved
include/fastgltf/types.hpp Show resolved Hide resolved
include/fastgltf/types.hpp Show resolved Hide resolved
…PORT`

- Remove `&&` from `transform`'s and `and_then`'s invoke_result
@spnda spnda merged commit c462eaf into spnda:main Aug 20, 2024
14 checks passed
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

Successfully merging this pull request may close these issues.

2 participants