diff options
author | Erik Sohns <eriksohns@fastmail.net> | 2015-12-04 18:53:58 +0100 |
---|---|---|
committer | Erik Sohns <eriksohns@fastmail.net> | 2015-12-04 18:53:58 +0100 |
commit | b695f270c103b3945fb9466401d10174944da8d5 (patch) | |
tree | 25d31bc1244854e4983457c925b30fff00e333dc | |
parent | 12805745e7b8e95c1f2991433c9c836fe9591a6c (diff) | |
download | ATCD-b695f270c103b3945fb9466401d10174944da8d5.tar.gz |
fixed an issue with (exported) template specializations (Win32)
-rw-r--r-- | ACE/ace/Condition_Recursive_Thread_Mutex.h | 6 | ||||
-rw-r--r-- | ACE/ace/config-g++-common.h | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/ACE/ace/Condition_Recursive_Thread_Mutex.h b/ACE/ace/Condition_Recursive_Thread_Mutex.h index e3a5a42ef7b..8d0b277511a 100644 --- a/ACE/ace/Condition_Recursive_Thread_Mutex.h +++ b/ACE/ace/Condition_Recursive_Thread_Mutex.h @@ -110,13 +110,11 @@ private: }; // prevent implicit instantiations by includers to relieve the linker #if defined (ACE_HAS_CPP11_EXTERN_TEMPLATES) -// suppress a warning, g++ 5.2.1 does not support attributes on template -// instantiation declarations. *TODO*: this may go back further -# if defined (__GNUG__) && (__GNUC__ == 5 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ == 1) +# if defined (ACE_LACKS_CPP11_EXTERN_TEMPLATE_ATTRIBUTES) extern template class ACE_Condition<ACE_Recursive_Thread_Mutex>; # else extern template ACE_Export class ACE_Condition<ACE_Recursive_Thread_Mutex>; -# endif /* __GNUG__ && (__GNUC__ == 5 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ == 1) */ +# endif /* ACE_LACKS_CPP11_EXTERN_TEMPLATE_ATTRIBUTES */ #endif /* ACE_HAS_CPP11_EXTERN_TEMPLATES */ typedef ACE_Condition<ACE_Recursive_Thread_Mutex> ACE_Condition_Recursive_Thread_Mutex; diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h index 5a0f16d9b87..48774773f29 100644 --- a/ACE/ace/config-g++-common.h +++ b/ACE/ace/config-g++-common.h @@ -46,6 +46,13 @@ # if (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) # define ACE_HAS_CPP11_EXTERN_TEMPLATES # endif /* __GNUC__ >= 4.3 */ + +// *NOTE*: suppress a warning, g++ 5.2.1 does not support attributes on template +// instantiation declarations +// *TODO*: this probably goes back further than 5.2 +# if (__GNUC__ >= 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 2)) +# define ACE_LACKS_CPP11_EXTERN_TEMPLATE_ATTRIBUTES +# endif /* __GNUC__ >= 5.2 */ #endif /* ACE_HAS_CPP11 */ #if (defined (i386) || defined (__i386__)) && !defined (ACE_SIZEOF_LONG_DOUBLE) |