From 6b9c553dd0e20cebce0d86bc1f78788336003443 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 6 Mar 2001 20:42:21 +0000 Subject: [PATCH] Removed epicsCppStd.h and STD_ macro - not required. --- src/libCom/cppStd/epicsCppStd.h | 26 -------------------------- src/libCom/cppStd/epicsExcept.h | 6 +----- src/libCom/cppStd/epicsList.h | 13 ++++++------- 3 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 src/libCom/cppStd/epicsCppStd.h diff --git a/src/libCom/cppStd/epicsCppStd.h b/src/libCom/cppStd/epicsCppStd.h deleted file mode 100644 index 615d47717..000000000 --- a/src/libCom/cppStd/epicsCppStd.h +++ /dev/null @@ -1,26 +0,0 @@ -// $Id$ -// Author: Andrew Johnson -// Date: February 2001 - -// This file exists to try and provide a semblance of a standard -// C++ environment on all the compilers we support. GCC versions -// earlier than 3.0 don't put things in the std:: namespace even -// where the compiler actually supports namespaces, while other -// compilers do. The STD_ macro is therefor defined to be std:: -// where needed, empty where not. Eventually we'll be able to -// do a s/STD_ /std::/g and get rid of this header... - -#ifndef __EPICS_CPP_STD_H__ -#define __EPICS_CPP_STD_H__ - -#if defined(__GNUC__) && (__GNUC__<3) - - #define STD_ - -#else - - #define STD_ std:: - -#endif - -#endif // __EPICS_CPP_STD_H__ diff --git a/src/libCom/cppStd/epicsExcept.h b/src/libCom/cppStd/epicsExcept.h index fd463c888..37d13a7ee 100644 --- a/src/libCom/cppStd/epicsExcept.h +++ b/src/libCom/cppStd/epicsExcept.h @@ -5,10 +5,6 @@ #ifndef __EPICS_EXCEPT_H__ #define __EPICS_EXCEPT_H__ -// Don't use epicsThrow, it's no longer needed and will disappear soon -#define epicsThrow(exc, msg) \ - throw exc(msg) - #define epicsThrowHere(exc, msg) \ throw locationException(msg, __FILE__, __LINE__) @@ -33,7 +29,7 @@ public: /* Examples: - * if (status) epicsThrowHere(STD_ logic_error, "failed!"); + * if (status) epicsThrowHere(std::logic_error, "failed!"); * try { ... } catch(sourceLocation& where) { ... } */ diff --git a/src/libCom/cppStd/epicsList.h b/src/libCom/cppStd/epicsList.h index 04913252e..8e3d51c38 100644 --- a/src/libCom/cppStd/epicsList.h +++ b/src/libCom/cppStd/epicsList.h @@ -7,7 +7,6 @@ #include "epicsListBase.h" #include "epicsExcept.h" -#include "epicsCppStd.h" #include // epicsList @@ -200,28 +199,28 @@ inline epicsList::size_type epicsList::size() const { template inline T epicsList::front() { if (empty()) - throw STD_ logic_error("epicsList::front: list empty"); + throw std::logic_error("epicsList::front: list empty"); return static_cast(_head.next()->payload); } template inline const T epicsList::front() const { if (empty()) - throw STD_ logic_error("epicsList::front: list empty"); + throw std::logic_error("epicsList::front: list empty"); return static_cast(_head.next()->payload); } template inline T epicsList::back() { if (empty()) - throw STD_ logic_error("epicsList::back: list empty"); + throw std::logic_error("epicsList::back: list empty"); return static_cast(_head.prev()->payload); } template inline const T epicsList::back() const { if (empty()) - throw STD_ logic_error("epicsList::back: list empty"); + throw std::logic_error("epicsList::back: list empty"); return static_cast(_head.prev()->payload); } @@ -236,7 +235,7 @@ inline void epicsList::push_front(const T x) { template inline void epicsList::pop_front() { if (empty()) - throw STD_ logic_error("epicsList::pop_front: list empty"); + throw std::logic_error("epicsList::pop_front: list empty"); epicsListNode* node = _head.next(); node->unlink(); _count--; @@ -254,7 +253,7 @@ inline void epicsList::push_back(const T x) { template inline void epicsList::pop_back() { if (empty()) - throw STD_ logic_error("epicsList::pop_back: list empty"); + throw std::logic_error("epicsList::pop_back: list empty"); epicsListNode* node = _head.prev(); node->unlink(); _count--;