From c78022ed075f5cecd1913ee6d37c599db579d2cd Mon Sep 17 00:00:00 2001 From: John Criswell Date: Tue, 29 Jul 2003 19:11:58 +0000 Subject: Enable JIT when the platform supports it. Select /localhome/$USER when it exists. Fix the checks for bidirectional and forward iterators so that they work with version of GCC prior to 3.x. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7383 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/Support/iterator | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'include/Support/iterator') diff --git a/include/Support/iterator b/include/Support/iterator index d0c7b511f0..96ea7781ce 100644 --- a/include/Support/iterator +++ b/include/Support/iterator @@ -23,6 +23,11 @@ #include +////////////////////////////////////////////////////////////////////////////// +// If the bidirectional iterator is not defined, attempt to define it using +// the C++ standard iterator. +////////////////////////////////////////////////////////////////////////////// +#ifndef HAVE_BI_ITERATOR #ifdef HAVE_STD_ITERATOR // Define stupid wrappers around std::iterator... @@ -31,16 +36,34 @@ struct bidirectional_iterator : public std::iterator { }; -template -struct forward_iterator - : public std::iterator { -}; +#else +#error "Need to have standard iterator to define bidirectional iterator!" +#endif #else // Just use bidirectional_iterator directly. using std::bidirectional_iterator; + +#endif + +////////////////////////////////////////////////////////////////////////////// +// If the forward iterator is not defined, attempt to define it using the +// C++ standard iterator. +////////////////////////////////////////////////////////////////////////////// +#ifndef HAVE_FWD_ITERATOR +#ifdef HAVE_STD_ITERATOR +template +struct forward_iterator + : public std::iterator { +}; +#else +#error "Need to have standard iterator to define forward iterator!" +#endif +#else +// Just use forward iterator directly. using std::forward_iterator; #endif + #endif -- cgit v1.2.3-70-g09d2