fix(Foundation): Adjust standard header inclusion logic for VS2022 clang-cl compatibility

Move <typeinfo> and <cstdlib> out of the POCO_HAVE_CXXABI_H conditional block —
these are core C++ standard library headers and should not be tied to CXXABI detection logic.

Compilation with clang-cl (Visual Studio 2022) failed due to an undefined POCO_HAVE_CXXABI_H macro,
which led to missing <typeinfo> inclusion and subsequent "incomplete type 'const type_info'" errors.
This change decouples standard headers from CXXABI checks to resolve the VS2022 clang-cl build issue.
This commit is contained in:
魏立国
2026-01-14 15:46:52 +08:00
committed by Matej Kenda
parent 17864c39a8
commit 8f134fff7b

View File

@@ -21,11 +21,11 @@
#include "Poco/Foundation.h"
#include <cstdint>
#include <type_traits>
#include <typeinfo>
#include <cstdlib>
#if defined(POCO_HAVE_CXXABI_H)
#include <typeinfo>
#include <cxxabi.h>
#include <cstdlib>
#endif
namespace Poco {