Core: Enable compiling with MSVC /permissive- (#11014)

* Base: Fixes for MSVC permissive-

* App: Fixes for MSVC permissive-

* Gui: Fixes for MSVC permissive-

* Main: Fixes for MSVC permissive-

* Fem: Fixes for MSVC permissive-

* Material: Fixes for MSVC permissive-

* Part: Fixes for MSVC permissive-

* Mesh: Fixes for MSVC permissive-

* Points: Fixes for MSVC permissive-

* Robot: Fixes for MSVC permissive-

* TechDraw: Fixes for MSVC permissive-

* Path: Fixes for MSVC permissive-

* Core; Changes per review comments

* TD: Revision from wandererfan

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Chris Hennes
2023-11-27 10:37:29 -06:00
committed by GitHub
parent a462e8e616
commit cfd41683a5
45 changed files with 133 additions and 95 deletions

View File

@@ -315,12 +315,12 @@ public:
// VC2013 has trouble with template argument dependent lookup in
// namespace. Have to put the below functions in global namespace.
//
// However, gcc seems to behave the oppsite, hence the conditional
// However, gcc seems to behave the opposite, hence the conditional
// compilation here.
//
#ifdef _MSC_VER
friend void ::intrusive_ptr_add_ref(LinkInfo *px);
friend void ::intrusive_ptr_release(LinkInfo *px);
#if defined(_MSC_VER)
friend void Gui::intrusive_ptr_add_ref(LinkInfo *px);
friend void Gui::intrusive_ptr_release(LinkInfo *px);
#else
friend inline void intrusive_ptr_add_ref(LinkInfo *px) { px->addref(); }
friend inline void intrusive_ptr_release(LinkInfo *px) { px->release(); }
@@ -688,13 +688,18 @@ public:
}
};
#ifdef _MSC_VER
void intrusive_ptr_add_ref(Gui::LinkInfo *px){
px->addref();
}
#if defined(_MSC_VER)
namespace Gui
{
void intrusive_ptr_add_ref(Gui::LinkInfo* px)
{
px->addref();
}
void intrusive_ptr_release(Gui::LinkInfo *px){
px->release();
void intrusive_ptr_release(Gui::LinkInfo* px)
{
px->release();
}
}
#endif