spnda / fastgltf

A modern C++17 glTF 2.0 library focused on speed, correctness, and usability
https://fastgltf.readthedocs.io/v0.8.x/
MIT License
275 stars 42 forks source link

Implement #70 #71

Closed n0F4x closed 4 weeks ago

n0F4x commented 4 weeks ago

Check for function provided to and_then returning optional type is missing

n0F4x commented 4 weeks ago

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.