constructor_destructor_no_store_hash_fn_imps.hpp revision 169691
1193323Sed// -*- C++ -*- 2193323Sed 3193323Sed// Copyright (C) 2005, 2006 Free Software Foundation, Inc. 4193323Sed// 5193323Sed// This file is part of the GNU ISO C++ Library. This library is free 6193323Sed// software; you can redistribute it and/or modify it under the terms 7193323Sed// of the GNU General Public License as published by the Free Software 8193323Sed// Foundation; either version 2, or (at your option) any later 9193323Sed// version. 10193323Sed 11193323Sed// This library is distributed in the hope that it will be useful, but 12193323Sed// WITHOUT ANY WARRANTY; without even the implied warranty of 13193323Sed// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14193323Sed// General Public License for more details. 15193323Sed 16193323Sed// You should have received a copy of the GNU General Public License 17193323Sed// along with this library; see the file COPYING. If not, write to 18193323Sed// the Free Software Foundation, 59 Temple Place - Suite 330, Boston, 19193323Sed// MA 02111-1307, USA. 20198090Srdivacky 21198892Srdivacky// As a special exception, you may use this file as part of a free 22193323Sed// software library without restriction. Specifically, if other files 23193323Sed// instantiate templates or use macros or inline functions from this 24193323Sed// file, or you compile this file and link it with other files to 25193323Sed// produce an executable, this file does not by itself cause the 26193323Sed// resulting executable to be covered by the GNU General Public 27193323Sed// License. This exception does not however invalidate any other 28193323Sed// reasons why the executable file might be covered by the GNU General 29193323Sed// Public License. 30193323Sed 31193323Sed// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. 32198090Srdivacky 33198090Srdivacky// Permission to use, copy, modify, sell, and distribute this software 34193323Sed// is hereby granted without fee, provided that the above copyright 35199481Srdivacky// notice appears in all copies, and that both that copyright notice 36193323Sed// and this permission notice appear in supporting documentation. None 37193323Sed// of the above authors, nor IBM Haifa Research Laboratories, make any 38193323Sed// representation about the suitability of this software for any 39193323Sed// purpose. It is provided "as is" without express or implied 40193323Sed// warranty. 41193323Sed 42193323Sed/** 43193323Sed * @file constructor_destructor_no_store_hash_fn_imps.hpp 44223017Sdim * Contains implementations of cc_ht_map_'s constructors, destructor, 45199511Srdivacky * and related functions. 46199481Srdivacky */ 47193323Sed 48199511SrdivackyPB_DS_CLASS_T_DEC 49193323Sedinline void 50193323SedPB_DS_CLASS_C_DEC:: 51199481Srdivackyconstructor_insert_new_imp(const_mapped_reference r_val, size_type pos, 52193323Sed false_type) 53193323Sed{ 54193323Sed // Following lines might throw an exception. 55199481Srdivacky entry_pointer p = get_entry(r_val, traits_base::s_no_throw_copies_indicator); 56199481Srdivacky 57199481Srdivacky // At this point no exceptions can be thrown. 58199481Srdivacky p->m_p_next = m_entries[pos]; 59199481Srdivacky m_entries[pos] = p; 60199481Srdivacky _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(r_key);) 61193323Sed} 62199481Srdivacky