diff options
| author | John Criswell <criswell@uiuc.edu> | 2003-07-29 19:11:58 +0000 |
|---|---|---|
| committer | John Criswell <criswell@uiuc.edu> | 2003-07-29 19:11:58 +0000 |
| commit | c78022ed075f5cecd1913ee6d37c599db579d2cd (patch) | |
| tree | 399632c7b13924e441f922226d010f899316c783 /include/Support | |
| parent | a1f1fea10511d811e45dc1ac1749a18931506494 (diff) | |
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
Diffstat (limited to 'include/Support')
| -rw-r--r-- | include/Support/iterator | 31 |
1 files changed, 27 insertions, 4 deletions
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 <iterator> +////////////////////////////////////////////////////////////////////////////// +// 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<std::bidirectional_iterator_tag, Ty, PtrDiffTy> { }; -template<class Ty, class PtrDiffTy> -struct forward_iterator - : public std::iterator<std::forward_iterator_tag, Ty, PtrDiffTy> { -}; +#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<class Ty, class PtrDiffTy> +struct forward_iterator + : public std::iterator<std::forward_iterator_tag, Ty, PtrDiffTy> { +}; +#else +#error "Need to have standard iterator to define forward iterator!" +#endif +#else +// Just use forward iterator directly. using std::forward_iterator; #endif + #endif |
