diff --git a/cmake/check.cpp b/cmake/check.cpp index fb66b2c..bb9ddad 100644 --- a/cmake/check.cpp +++ b/cmake/check.cpp @@ -3,8 +3,8 @@ #include struct SomeStruct { - constexpr SomeStruct(auto&& arg) { - arg.Method(42); + explicit constexpr SomeStruct(auto&& arg) { + arg.Method(42); // NOLINT }; }; @@ -15,15 +15,13 @@ struct Injector { template inline constexpr auto Use() { - std::ignore = T{Args...}; + std::ignore = __builtin_constant_p(T{Args...}); }; template consteval auto Ignore() {}; - auto main() -> int { Ignore())>(); static_assert(std::is_same_v{})), utempl::TypeList>); }; - diff --git a/cmake/cserverConfig.cmake.in b/cmake/cserverConfig.cmake.in index c7e7b35..6e43fcf 100644 --- a/cmake/cserverConfig.cmake.in +++ b/cmake/cserverConfig.cmake.in @@ -6,5 +6,5 @@ check_required_components("@PROJECT_NAME@") try_compile(loopholes_body_inject SOURCES "${CMAKE_CURRENT_LIST_DIR}/check.cpp") if(NOT loopholes_body_inject) - message(FATAL_ERROR "The Compiler Doesn't Support Retrieval Of Information Via Loopholes. If You Are Using gcc, Enable Optimizations.") + message(FATAL_ERROR "The Compiler Doesn't Support Retrieval Of Information Via Loopholes.") endif() diff --git a/include/cserver/engine/components.hpp b/include/cserver/engine/components.hpp index 0ae291e..3592ac7 100644 --- a/include/cserver/engine/components.hpp +++ b/include/cserver/engine/components.hpp @@ -336,7 +336,7 @@ struct DependencyInfoKey {}; template inline constexpr auto Use() { - std::ignore = T{Args...}; + std::ignore = __builtin_constant_p(T{Args...}); }; template