A
download stl_range_errors.h
Language: C
Copyright: (c) 1999
LOC: 30
Project Info
STL
Server: SGI
Type: zip
SGI\s\STL\STL\
   algo.h
   algobase.h
   alloc.h
   bvector.h
   char_traits.h
   concept_checks.h
   container_concepts.h
   defalloc.h
   deque.h
   function.h
   hash_map.h
   hash_set.h
   hashtable.h
   heap.h
   iterator.h
   list.h
   map.h
   multimap.h
   multiset.h
   pair.h
   pthread_alloc.h
   rope.h
   ropeimpl.h
   sequence_concepts.h
   set.h
   slist.h
   stack.h
   stl_algo.h
   stl_algobase.h
   stl_alloc.h
   stl_bvector.h
   stl_config.h
   stl_construct.h
   stl_ctraits_fns.h
   stl_deque.h
   stl_exception.h
   stl_function.h
   stl_hash_fun.h
   stl_hash_map.h
   stl_hash_set.h
   stl_hashtable.h
   stl_heap.h
   stl_iterator.h
   stl_iterator_base.h
   stl_list.h
   stl_map.h
   stl_multimap.h
   stl_multiset.h
   stl_numeric.h
   stl_pair.h
   stl_queue.h
   stl_range_errors.h
   stl_raw_storage_iter.h
   stl_relops.h
   stl_rope.h
   stl_set.h
   stl_slist.h
   stl_stack.h
   stl_string_fwd.h
   stl_tempbuf.h
   stl_threads.h
   stl_tree.h
   stl_uninitialized.h
   stl_vector.h
   tempbuf.h
   tree.h
   type_traits.h
   vector.h

/*
 * Copyright (c) 1999
 * Silicon Graphics
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  Silicon Graphics makes no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied warranty.
 *
 */

#ifndef __STL_RANGE_ERRORS_H
#define __STL_RANGE_ERRORS_H

// A few places in the STL throw range errors, using standard exception
// classes defined in <stdexcept>.  This header file provides functions
// to throw those exception objects.

// __STL_DONT_THROW_RANGE_ERRORS is a hook so that users can disable
// this exception throwing.

#include <stl_config.h>

#if defined(__STL_CAN_THROW_RANGE_ERRORS) && \
    defined(__STL_USE_EXCEPTIONS) && \
    !defined(__STL_DONT_THROW_RANGE_ERRORS)
# define __STL_THROW_RANGE_ERRORS
#endif

// For the SGI 7.3 compiler, declare these functions here and define them
// elsewhere.
#if defined(__STL_THROW_RANGE_ERRORS) && \
    defined(__sgi) && !defined(__GNUC__) && \
    _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)

__STL_BEGIN_NAMESPACE
void __stl_throw_range_error(const char* __msg);
void __stl_throw_length_error(const char* __msg);
__STL_END_NAMESPACE

// For other compilers where we're throwing range errors, include the
// stdexcept header and throw the appropriate exceptions directly.
#elif defined(__STL_THROW_RANGE_ERRORS)

#include <stdexcept>

__STL_BEGIN_NAMESPACE
inline void __stl_throw_range_error(const char* __msg) 
  { throw range_error(__msg); }
inline void __stl_throw_length_error(const char* __msg)
  { throw length_error(__msg); }
__STL_END_NAMESPACE

// Otherwise, define inline functions that do nothing.
#else 

__STL_BEGIN_NAMESPACE
inline void __stl_throw_range_error(const char*) {}
inline void __stl_throw_length_error(const char*) {}
__STL_END_NAMESPACE

#endif

#endif /* __STL_RANGE_ERRORS_H */

// Local Variables:
// mode:C++
// End:

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us