From 1199fabe9024b8afd8dc1e1e150bb5fd12b6adc3 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Fri, 21 Sep 2018 14:25:19 +0200 Subject: [PATCH] Fix strange compiler errors with gcc 2.96: using ; seems not to work but using namespace ; works Also 'add' only works with explicit namespace. Why? --- modules/libcom/test/epicsAtomicTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/libcom/test/epicsAtomicTest.cpp b/modules/libcom/test/epicsAtomicTest.cpp index fd9fc2e6b..d9a6c57d2 100644 --- a/modules/libcom/test/epicsAtomicTest.cpp +++ b/modules/libcom/test/epicsAtomicTest.cpp @@ -8,6 +8,8 @@ #include "epicsUnitTest.h" #include "testMain.h" +using namespace epics::atomic; + namespace { template < class T > @@ -52,7 +54,7 @@ static void add ( void *arg ) using epics::atomic::increment; TestDataAddSub < T > * const pTestData = reinterpret_cast < TestDataAddSub < T > * > ( arg ); - add ( pTestData->m_testValue, TestDataAddSub < T > :: delta ); + epics::atomic::add ( pTestData->m_testValue, TestDataAddSub < T > :: delta ); increment ( pTestData->m_testIterations ); }