How to check if compiler is C++ and a /clr compiler option is set in C++

1 Answer

0 votes
#include <stdio.h>

int main() {
#ifdef __cplusplus_cli
    printf("%d\n", __cplusplus_cli);
#else
    printf("not cplusplus_cli\n");
#endif
}





/*
run:

not cplusplus_cli

*/

 



answered Apr 21, 2022 by avibootz

Related questions

1 answer 202 views
202 views asked Apr 22, 2022 by avibootz
1 answer 153 views
153 views asked Apr 22, 2022 by avibootz
1 answer 145 views
145 views asked Apr 22, 2022 by avibootz
1 answer 175 views
1 answer 155 views
155 views asked Apr 22, 2022 by avibootz
1 answer 240 views
2 answers 222 views
...