debug_fn_imps.hpp revision 285830
1258945Sroberto// -*- C++ -*-
2280849Scy
3280849Scy// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
4280849Scy//
5280849Scy// This file is part of the GNU ISO C++ Library.  This library is free
6280849Scy// software; you can redistribute it and/or modify it under the terms
7280849Scy// of the GNU General Public License as published by the Free Software
8280849Scy// Foundation; either version 2, or (at your option) any later
9280849Scy// version.
10280849Scy
11280849Scy// This library is distributed in the hope that it will be useful, but
12280849Scy// WITHOUT ANY WARRANTY; without even the implied warranty of
13280849Scy// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14280849Scy// General Public License for more details.
15280849Scy
16280849Scy// You should have received a copy of the GNU General Public License
17280849Scy// along with this library; see the file COPYING.  If not, write to
18280849Scy// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
19280849Scy// MA 02111-1307, USA.
20280849Scy
21280849Scy// As a special exception, you may use this file as part of a free
22280849Scy// software library without restriction.  Specifically, if other files
23280849Scy// instantiate templates or use macros or inline functions from this
24280849Scy// file, or you compile this file and link it with other files to
25280849Scy// produce an executable, this file does not by itself cause the
26258945Sroberto// resulting executable to be covered by the GNU General Public
27258945Sroberto// License.  This exception does not however invalidate any other
28258945Sroberto// reasons why the executable file might be covered by the GNU General
29258945Sroberto// Public License.
30280849Scy
31280849Scy// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
32258945Sroberto
33258945Sroberto// Permission to use, copy, modify, sell, and distribute this software
34258945Sroberto// is hereby granted without fee, provided that the above copyright
35258945Sroberto// notice appears in all copies, and that both that copyright notice
36258945Sroberto// and this permission notice appear in supporting documentation. None
37258945Sroberto// of the above authors, nor IBM Haifa Research Laboratories, make any
38258945Sroberto// representation about the suitability of this software for any
39258945Sroberto// purpose. It is provided "as is" without express or implied
40258945Sroberto// warranty.
41258945Sroberto
42258945Sroberto/**
43258945Sroberto * @file debug_fn_imps.hpp
44258945Sroberto * Contains implementations of cc_ht_map_'s debug-mode functions.
45258945Sroberto */
46258945Sroberto
47258945Sroberto#ifdef _GLIBCXX_DEBUG
48258945Sroberto
49258945SrobertoPB_DS_CLASS_T_DEC
50258945Srobertovoid
51258945SrobertoPB_DS_CLASS_C_DEC::
52258945Srobertoassert_valid() const
53258945Sroberto{
54258945Sroberto  size_type calc_size = 0;
55258945Sroberto  for (const_iterator it = begin(); it != end(); ++it)
56258945Sroberto    {
57258945Sroberto      map_debug_base::check_key_exists(PB_DS_V2F(*it));
58258945Sroberto      ++calc_size;
59258945Sroberto    }
60258945Sroberto  map_debug_base::check_size(calc_size);
61258945Sroberto}
62258945Sroberto
63258945Sroberto#endif
64258945Sroberto