mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-18 02:45:40 +02:00
Fixed std::distance compile error with Oracle Solaris Studio 12.1
Building Catch with Oracle Solaris Studio 12.1 generates an error when calling std::distance due to the toolchains non-compliant STL implementation. This implementation returns its result via an output parameter rather than a return value.
This commit is contained in:
@@ -119,6 +119,16 @@
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Oracle Solaris Studio
|
||||
#ifdef __SUNPRO_CC
|
||||
|
||||
# if __SUNPRO_CC == 0x5100 // Oracle Solaris Studio version 12.1
|
||||
# define CATCH_INTERNAL_SUNPRO_CC_NON_COMPLIANT_STL
|
||||
# endif
|
||||
|
||||
#endif // __SUNPRO_CC
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Use variadic macros if the compiler supports them
|
||||
|
Reference in New Issue
Block a user