From: Jan Vorlicek Date: Thu, 21 Jul 2016 00:37:26 +0000 (+0200) Subject: Remove include of from seh.cpp (#6359) X-Git-Tag: accepted/tizen/base/20180629.140029~4004 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32a020e47a0797bba4167e85efc38a34397f633e;p=platform%2Fupstream%2Fcoreclr.git Remove include of from seh.cpp (#6359) In my previous change that made exceptions smaller, I had `#include ` and I haven't realized that it pulls in some stl headers. That breaks build on ARM. The fix is to replace that include by defining just the std::move that's all that was needed from the header. --- diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp index c00be51..24eebbb 100644 --- a/src/pal/src/exception/seh-unwind.cpp +++ b/src/pal/src/exception/seh-unwind.cpp @@ -26,8 +26,7 @@ Abstract: #include "pal/context.h" #include "pal.h" #include -#include - + #if HAVE_LIBUNWIND_H #ifndef __linux__ #define UNW_LOCAL_ONLY diff --git a/src/pal/src/exception/seh.cpp b/src/pal/src/exception/seh.cpp index 5aaa18f..5320ecd 100644 --- a/src/pal/src/exception/seh.cpp +++ b/src/pal/src/exception/seh.cpp @@ -39,7 +39,37 @@ Abstract: #include #include #include -#include + +// Define the std::move so that we don't have to include the header +// which on some platforms pulls in STL stuff that collides with PAL stuff. +// The std::move is needed to enable using move constructor and assignment operator +// for PAL_SEHException. +namespace std +{ + template + struct remove_reference + { + typedef T type; + }; + + template + struct remove_reference + { + typedef T type; + }; + + template + struct remove_reference + { + typedef T type; + }; + + template inline + typename remove_reference::type&& move(T&& arg) + { // forward arg as movable + return ((typename remove_reference::type&&)arg); + } +} using namespace CorUnix;