Removed epicsCppStd.h and STD_ macro - not required.

This commit is contained in:
Andrew Johnson
2001-03-06 20:42:21 +00:00
parent 2de1587cba
commit 6b9c553dd0
3 changed files with 7 additions and 38 deletions
-26
View File
@@ -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__
+1 -5
View File
@@ -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<exc>(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) { ... }
*/
+6 -7
View File
@@ -7,7 +7,6 @@
#include "epicsListBase.h"
#include "epicsExcept.h"
#include "epicsCppStd.h"
#include <stdexcept>
// epicsList
@@ -200,28 +199,28 @@ inline epicsList<T>::size_type epicsList<T>::size() const {
template <class T>
inline T epicsList<T>::front() {
if (empty())
throw STD_ logic_error("epicsList::front: list empty");
throw std::logic_error("epicsList::front: list empty");
return static_cast<T>(_head.next()->payload);
}
template <class T>
inline const T epicsList<T>::front() const {
if (empty())
throw STD_ logic_error("epicsList::front: list empty");
throw std::logic_error("epicsList::front: list empty");
return static_cast<const T>(_head.next()->payload);
}
template <class T>
inline T epicsList<T>::back() {
if (empty())
throw STD_ logic_error("epicsList::back: list empty");
throw std::logic_error("epicsList::back: list empty");
return static_cast<T>(_head.prev()->payload);
}
template <class T>
inline const T epicsList<T>::back() const {
if (empty())
throw STD_ logic_error("epicsList::back: list empty");
throw std::logic_error("epicsList::back: list empty");
return static_cast<const T>(_head.prev()->payload);
}
@@ -236,7 +235,7 @@ inline void epicsList<T>::push_front(const T x) {
template <class T>
inline void epicsList<T>::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<T>::push_back(const T x) {
template <class T>
inline void epicsList<T>::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--;