On 2018-10-07 09:56, Lars Knoll wrote:
IMO #pragma once is both safer and nicer to use than classic header guards.
Regarding safety, clang has -Wheader-guard which catches typos in header guards, so most of our codebase should be ok. (Would be nice to have clang-cl -Werror builds on our Windows CI though!)
Inspired by this I quickly hacked a clazy check to find typos in all ifndef/define pairs, since clang only does it for include guards.
It found this https://codereview.qt-project.org/#/c/242090/ Regards, -- Sérgio Martins | [email protected] | Senior Software Engineer Klarälvdalens Datakonsult AB, a KDAB Group company Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322) KDAB - The Qt, C++ and OpenGL Experts _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
