-
Notifications
You must be signed in to change notification settings - Fork 230
Open
Description
tried to build a POC, got some warnings,
would be nice to get it down to 0!? :)
Build started...
1>------ Build started: Project: Lazy_importer_POC, Configuration: Debug x64 ------
1>Lazy_importer_POC.cpp
1>C:\Users\user\source\repos\Lazy_importer_POC\lazy_importer.hpp(658,1): warning C4127: conditional expression is constant
1>C:\Users\user\source\repos\Lazy_importer_POC\lazy_importer.hpp(658,1): message : consider using 'if constexpr' statement instead
1>C:\Users\user\source\repos\Lazy_importer_POC\Lazy_importer_POC.cpp(14): message : see reference to function template instantiation 'F (__cdecl *li::detail::lazy_function<1255338670209748596,BOOL (__cdecl *)(LPVOID,SIZE_T,DWORD,PDWORD)>::in<T,false,void*>(Module) noexcept)(LPVOID,SIZE_T,DWORD,PDWORD)' being compiled
1> with
1> [
1> F=BOOL (__cdecl *)(LPVOID,SIZE_T,DWORD,PDWORD),
1> T=BOOL (__cdecl *)(LPVOID,SIZE_T,DWORD,PDWORD),
1> Module=void *
1> ]
1>C:\Users\user\source\repos\Lazy_importer_POC\Lazy_importer_POC.cpp(14): message : see reference to function template instantiation 'F (__cdecl *li::detail::lazy_function<1255338670209748596,BOOL (__cdecl *)(LPVOID,SIZE_T,DWORD,PDWORD)>::in<T,false,void*>(Module) noexcept)(LPVOID,SIZE_T,DWORD,PDWORD)' being compiled
1> with
1> [
1> F=BOOL (__cdecl *)(LPVOID,SIZE_T,DWORD,PDWORD),
1> T=BOOL (__cdecl *)(LPVOID,SIZE_T,DWORD,PDWORD),
1> Module=void *
1> ]
1>C:\Users\user\source\repos\Lazy_importer_POC\lazy_importer.hpp(662,1): warning C4127: conditional expression is constant
1>C:\Users\user\source\repos\Lazy_importer_POC\lazy_importer.hpp(662,1): message : consider using 'if constexpr' statement instead
1>C:\Users\user\source\repos\Lazy_importer_POC\lazy_importer.hpp(666,1): warning C4127: conditional expression is constant
1>C:\Users\user\source\repos\Lazy_importer_POC\lazy_importer.hpp(666,1): message : consider using 'if constexpr' statement instead
POC app:
#include <Windows.h>
#include <iostream>
#include "lazy_importer.hpp"
int main()
{
std::cout << "Hello World!\n";
LI_FN(OutputDebugStringA)("hello world");
LI_FN(VirtualProtect).in(LI_MODULE("kernel32.dll").cached());
}
Metadata
Metadata
Assignees
Labels
No labels