constructor_destructor_no_store_hash_fn_imps.hpp revision 256281
1171802Sdelphij// -*- C++ -*- 2170808Sdelphij 3170808Sdelphij// Copyright (C) 2005, 2006 Free Software Foundation, Inc. 4171802Sdelphij// 5170808Sdelphij// This file is part of the GNU ISO C++ Library. This library is free 6170808Sdelphij// software; you can redistribute it and/or modify it under the terms 7170808Sdelphij// of the GNU General Public License as published by the Free Software 8170808Sdelphij// Foundation; either version 2, or (at your option) any later 9170808Sdelphij// version. 10170808Sdelphij 11170808Sdelphij// This library is distributed in the hope that it will be useful, but 12170808Sdelphij// WITHOUT ANY WARRANTY; without even the implied warranty of 13170808Sdelphij// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14170808Sdelphij// General Public License for more details. 15170808Sdelphij 16170808Sdelphij// You should have received a copy of the GNU General Public License 17170808Sdelphij// along with this library; see the file COPYING. If not, write to 18170808Sdelphij// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, 19170808Sdelphij// MA 02111-1307, USA. 20170808Sdelphij 21170808Sdelphij// As a special exception, you may use this file as part of a free 22170808Sdelphij// software library without restriction. Specifically, if other files 23170808Sdelphij// instantiate templates or use macros or inline functions from this 24170808Sdelphij// file, or you compile this file and link it with other files to 25170808Sdelphij// produce an executable, this file does not by itself cause the 26170808Sdelphij// resulting executable to be covered by the GNU General Public 27170808Sdelphij// License. This exception does not however invalidate any other 28170808Sdelphij// reasons why the executable file might be covered by the GNU General 29170808Sdelphij// Public License. 30170808Sdelphij 31170808Sdelphij// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 32170808Sdelphij 33170808Sdelphij// Permission to use, copy, modify, sell, and distribute this software 34170808Sdelphij// is hereby granted without fee, provided that the above copyright 35170808Sdelphij// notice appears in all copies, and that both that copyright notice 36170808Sdelphij// and this permission notice appear in supporting documentation. None 37170808Sdelphij// of the above authors, nor IBM Haifa Research Laboratories, make any 38170808Sdelphij// representation about the suitability of this software for any 39170808Sdelphij// purpose. It is provided "as is" without express or implied 40170808Sdelphij// warranty. 41170808Sdelphij 42170808Sdelphij/** 43170808Sdelphij * @file constructor_destructor_no_store_hash_fn_imps.hpp 44170808Sdelphij * Contains implementations of cc_ht_map_'s constructors, destructor, 45170808Sdelphij * and related functions. 46170808Sdelphij */ 47170808Sdelphij 48170808SdelphijPB_DS_CLASS_T_DEC 49170808Sdelphijinline void 50170808SdelphijPB_DS_CLASS_C_DEC:: 51170808Sdelphijconstructor_insert_new_imp(const_mapped_reference r_val, size_type pos, 52170808Sdelphij false_type) 53170808Sdelphij{ 54170808Sdelphij // Following lines might throw an exception. 55170808Sdelphij entry_pointer p = get_entry(r_val, traits_base::s_no_throw_copies_indicator); 56170808Sdelphij 57170808Sdelphij // At this point no exceptions can be thrown. 58170808Sdelphij p->m_p_next = m_entries[pos]; 59170808Sdelphij m_entries[pos] = p; 60170808Sdelphij _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(r_key);) 61170808Sdelphij} 62170808Sdelphij