microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
8.02k stars 1.66k forks source link

fundatmental issue - __cplusplus_winrt != UWP #1318

Open mediabuff opened 4 years ago

mediabuff commented 4 years ago

The library has genesis with support of C++/CX and assumes UWP is C++/CX and is replete with __cplusplus_winrt.

Which should'nt be the case as there are other c++ variants like cppwinrt. How do leverage this lib in cppwinrt context - and yet be binding to UWP apis not win32 apis.

Should this library code be converted from

#if __cplusplus_winrt
#endif

to

#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP)
#endif
BrennanConroy commented 4 years ago

Looks like this issue prevents microsoft-signalr from using the cpprestsdk on UWP.

autoantwort commented 1 year ago

I think it should be

#if WINAPI_FAMILY == WINAPI_FAMILY_PC_APP
#endif

since __cplusplus_winrt means UWP only while WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP) is UWP + Desktop