mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Increased portability of CV_Func
This commit is contained in:
parent
6259ba1bfd
commit
9b727fa1f3
@ -86,12 +86,24 @@ namespace cv { namespace debug_build_guard { } using namespace debug_build_guard
|
|||||||
#define __CV_VA_NUM_ARGS_HELPER(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
|
#define __CV_VA_NUM_ARGS_HELPER(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
|
||||||
#define __CV_VA_NUM_ARGS(...) __CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
|
#define __CV_VA_NUM_ARGS(...) __CV_VA_NUM_ARGS_HELPER(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
|
||||||
|
|
||||||
#if defined __GNUC__
|
#ifdef CV_Func
|
||||||
|
// keep current value (through OpenCV port file)
|
||||||
|
#elif defined __GNUC__ || (defined (__cpluscplus) && (__cpluscplus >= 201103))
|
||||||
|
#define CV_Func __func__
|
||||||
|
#elif defined __clang__ && (__clang_minor__ * 100 + __clang_major >= 305)
|
||||||
|
#define CV_Func __func__
|
||||||
|
#elif defined(__STDC_VERSION__) && (__STDC_VERSION >= 199901)
|
||||||
#define CV_Func __func__
|
#define CV_Func __func__
|
||||||
#elif defined _MSC_VER
|
#elif defined _MSC_VER
|
||||||
#define CV_Func __FUNCTION__
|
#define CV_Func __FUNCTION__
|
||||||
|
#elif defined(__INTEL_COMPILER) && (_INTEL_COMPILER >= 600)
|
||||||
|
#define CV_Func __FUNCTION__
|
||||||
|
#elif defined __IBMCPP__ && __IBMCPP__ >=500
|
||||||
|
#define CV_Func __FUNCTION__
|
||||||
|
#elif defined __BORLAND__ && (__BORLANDC__ >= 0x550)
|
||||||
|
#define CV_Func __FUNC__
|
||||||
#else
|
#else
|
||||||
#define CV_Func ""
|
#define CV_Func "<unknown>"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! @cond IGNORED
|
//! @cond IGNORED
|
||||||
|
Loading…
Reference in New Issue
Block a user