patriciogonzalezvivo / glslViewer

Console-based GLSL Sandbox for 2D/3D shaders
BSD 3-Clause "New" or "Revised" License
4.62k stars 350 forks source link

Compile error in MacOS #278

Closed zhengying closed 1 year ago

zhengying commented 2 years ago

env: MacOS 11.6

Error info:

...
glslViewer/src/tools/text.cpp:90:21: error: chosen constructor is explicit in copy-initialization
        std::smatch match = {};
...

the compilation is successful after modified like this std::smatch match = {}; to
std::smatch match = std::smatch();

patriciogonzalezvivo commented 2 years ago

@tcoyvwac do you mind taking a look?

tcoyvwac commented 2 years ago

Sure thing @patriciogonzalezvivo, @zhengying: what compiler / compiler version are you using? This will help in understanding your error.

zhengying commented 2 years ago

Sure thing @patriciogonzalezvivo, @zhengying: what compiler / compiler version are you using? This will help in understanding your error.

compiler info: Apple clang version 13.0.0 (clang-1300.0.29.3)

tcoyvwac commented 2 years ago

Thanks for reporting the Issue @zhengying! :tada: It seems that Apple clang has a particular quirk which is different from other compilers (even clang on other systems)!

There is no pre-check for Apple clang on PRs so it seems this Apple clang quirk slipped through code review. :smile_cat:

patriciogonzalezvivo commented 2 years ago

Hi! Is this fixed? Or Is there something we need to change? Can I close this thread?