Guard some code which isn't currently buildable with VS2019

For some unknown reason, VC++2019 won't let us take the address of std::list::unique() - although other std::list members seem okay. I've spent weeks tracking this down but there's no fix available AFAICT.

I've flagged it up to the MSVC development team - just don't hold your breath !!
This commit is contained in:
John Emmas 2021-03-06 11:12:02 +00:00
parent e236c2ab0f
commit b625461132

View file

@ -1899,7 +1899,10 @@ public:
{
typedef std::list<T> LT;
return beginConstStdList<T> (name)
#if !defined(_MSC_VER) || (_MSC_VER < 1900)
/* std::list::unique() got broken in later versions of MSVC */
.addFunction ("unique", (void (LT::*)())&LT::unique)
#endif
.addFunction ("push_back", (void (LT::*)(const T&))&LT::push_back)
.addExtCFunction ("add", &CFunc::tableToList<T, LT>);
}
@ -1926,7 +1929,10 @@ public:
typedef T* TP;
typedef std::list<TP> LT;
return beginConstStdCPtrList<T> (name)
#if !defined(_MSC_VER) || (_MSC_VER < 1900)
/* std::list::unique() got broken in later versions of MSVC */
.addFunction ("unique", (void (LT::*)())&LT::unique)
#endif
.addExtCFunction ("push_back", &CFunc::pushbackptr<T, LT>);
}
@ -1970,7 +1976,10 @@ public:
.addPtrFunction ("empty", &LT::empty)
.addPtrFunction ("size", &LT::size)
.addPtrFunction ("reverse", &LT::reverse)
#if !defined(_MSC_VER) || (_MSC_VER < 1900)
/* std::list::unique() got broken in later versions of MSVC */
.addPtrFunction ("unique", (void (LT::*)())&LT::unique)
#endif
.addPtrFunction ("push_back", (void (LT::*)(const T&))&LT::push_back)
.addExtCFunction ("add", &CFunc::ptrTableToList<T, LT>)
.addExtCFunction ("iter", &CFunc::ptrListIter<T, LT>)