From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../assoc/detail/comb_hash_fn_string_form.hpp | 98 ++++++++ .../common_type/assoc/detail/ds_string_form.hpp | 255 +++++++++++++++++++++ .../detail/list_update_policy_string_form.hpp | 97 ++++++++ .../assoc/detail/probe_fn_string_form.hpp | 99 ++++++++ .../assoc/detail/resize_policy_string_form.hpp | 93 ++++++++ .../assoc/detail/size_policy_string_form.hpp | 95 ++++++++ .../assoc/detail/store_hash_string_form.hpp | 82 +++++++ .../detail/tree_supports_order_statistics.hpp | 73 ++++++ .../detail/trie_supports_order_statistics.hpp | 73 ++++++ .../assoc/detail/trie_supports_prefix_search.hpp | 73 ++++++ .../assoc/detail/trigger_policy_string_form.hpp | 141 ++++++++++++ 11 files changed, 1179 insertions(+) create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp create mode 100644 libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp (limited to 'libstdc++-v3/testsuite/util/common_type/assoc/detail') diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp new file mode 100644 index 000000000..0410ec977 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp @@ -0,0 +1,98 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file comb_hash_fn_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_COMB_HASH_FN_STRING_FORM_HPP +#define PB_DS_COMB_HASH_FN_STRING_FORM_HPP + +#include +#include +#include + +namespace __gnu_pbds +{ +namespace test +{ +namespace detail +{ + + template + struct comb_hash_fn_string_form + { + static std::string + name() + { return (Comb_Hash_Fn::name()); } + + static std::string + desc() + { return (Comb_Hash_Fn::desc()); } + }; + + template + struct comb_hash_fn_string_form< + direct_mask_range_hashing_t_< + Size_Type> > + { + static std::string + name() + { return ("mask_"); } + + static std::string + desc() + { + return make_xml_tag("Comb_Hash_Fn", "value", "direct_mask_range_hashing"); + } + }; + + template + struct comb_hash_fn_string_form > + { + static std::string + name() + { return ("mod_"); } + + static std::string + desc() + { + return make_xml_tag("Comb_Hash_Fn", "value", "direct_mod_range_hashing"); + } + }; + +} // namespace detail +} // namespace test +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_COMB_HASH_FN_STRING_FORM_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp new file mode 100644 index 000000000..9ee5c4dd7 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp @@ -0,0 +1,255 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file ds_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_DS_STRING_FORM_HPP +#define PB_DS_DS_STRING_FORM_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace __gnu_pbds +{ + namespace test + { + namespace detail + { + template + struct ds_string_form; + + template + struct ds_string_form + { + static std::string + name() + { + return ("cc_hash_" + + comb_hash_fn_string_form::name() + + resize_policy_string_form::name() + + store_hash_string_form::name()); + } + + static std::string + desc() + { + const std::string comb_hash_fn_desc = + comb_hash_fn_string_form::desc(); + + const std::string resize_policy_desc = + resize_policy_string_form::desc(); + + const std::string store_hash_desc = + store_hash_string_form::desc(); + + return (make_xml_tag("type", "value", "cc_hash_table", comb_hash_fn_desc + resize_policy_desc + store_hash_desc)); + } + }; + + template + struct ds_string_form + { + static std::string + name() + { + return ("gp_hash_" + + comb_hash_fn_string_form::name() + + probe_fn_string_form::name() + + resize_policy_string_form::name() + + store_hash_string_form::name()); + } + + static std::string + desc() + { + const std::string comb_probe_fn_desc = + comb_hash_fn_string_form::desc(); + + const std::string probe_fn_desc = + probe_fn_string_form::desc(); + + const std::string resize_policy_desc = + resize_policy_string_form::desc(); + + const std::string store_hash_desc = + store_hash_string_form::desc(); + + return make_xml_tag("type", "value", "gp_hash_table", + comb_probe_fn_desc + probe_fn_desc + resize_policy_desc + store_hash_desc); + } + }; + + template + struct tree_ds_string_form + { + static std::string + name(const std::string container_category_str) + { + if (tree_supports_order_statistics::value) + return (container_category_str + "ost_"); + return container_category_str; + } + + static std::string + desc(const std::string container_category_str) + { + const std::string category_str = + make_xml_tag("Tag", "value", container_category_str); + + const std::string node_update_str = + make_xml_tag("Node_Update", + "value",(tree_supports_order_statistics::value ? + "tree_order_statistics_node_update" : "null_tree_node_update")); + + return make_xml_tag("type", "value", "tree", category_str + node_update_str); + } + }; + + template + struct ds_string_form + : private tree_ds_string_form + { + private: + typedef tree_ds_string_form< Cntnr> base_type; + + public: + static std::string + name() + { return base_type::name("rb_tree_"); } + + static std::string + desc() + { return base_type::desc("rb_tree_tag"); } + }; + + template + struct ds_string_form + : private tree_ds_string_form + { + private: + typedef tree_ds_string_form< Cntnr> base_type; + + public: + static std::string + name() + { return base_type::name("splay_tree_"); } + + static std::string + desc() + { return base_type::desc("splay_tree_tag"); } + }; + + template + struct ds_string_form + : private tree_ds_string_form + { + private: + typedef tree_ds_string_form< Cntnr> base_type; + + public: + static std::string + name() + { return (base_type::name("ov_tree_")); } + + static std::string + desc() + { return (base_type::desc("ov_tree_tag")); } + }; + + template + struct ds_string_form + { + static std::string + name() + { + return ("lu_" + + lu_policy_string_form::name()); + } + + static std::string + desc() + { + return make_xml_tag("type", "value", "list_update", + lu_policy_string_form::desc()); + } + }; + + template + struct ds_string_form + { + static std::string + name() + { + if (trie_supports_order_statistics::value) + return ("pat_trie_ost_"); + + if (trie_supports_prefix_search::value) + return ("pat_trie_prs_"); + + return ("pat_trie_"); + } + + static std::string + desc() + { + std::string category_s = make_xml_tag("Tag", "value", "pat_trie_tag"); + const char* s; + if (trie_supports_order_statistics::value) + s = "trie_order_statistics_node_update"; + else if (trie_supports_prefix_search::value) + s = "trie_prefix_search_node_update"; + else + s = "null_trie_node_update"; + std::string node_s = make_xml_tag("Node_Update", "value", s); + return make_xml_tag("type", "value", "trie", category_s + node_s); + } + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_DS_STRING_FORM_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp new file mode 100644 index 000000000..ed3747fa1 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp @@ -0,0 +1,97 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file lu_policy_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_LU_POLICY_STRING_FORM_HPP +#define PB_DS_LU_POLICY_STRING_FORM_HPP + +#include +#include +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct lu_policy_string_form; + + template<> + struct lu_policy_string_form + { + static std::string + name() + { return ("mtf_"); } + + static std::string + desc() + { + return make_xml_tag("Update_Policy", "value", + "move_to_front_lu_policy"); + } + }; + + template + struct lu_policy_string_form > + { + static std::string + name() + { + std::ostringstream ret; + ret << "cnt_" << Max_Count << "_"; + return (ret.str()); + } + + static std::string + desc() + { + return (make_xml_tag("Update_Policy", "value", "counter_lu_policy", + "Max_Count", Max_Count)); + } + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_LU_POLICY_STRING_FORM_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp new file mode 100644 index 000000000..15cbbfda5 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp @@ -0,0 +1,99 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file probe_fn_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_PROBE_FN_STRING_FORM_HPP +#define PB_DS_PROBE_FN_STRING_FORM_HPP + +#include +#include +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct probe_fn_string_form; + + template + struct probe_fn_string_form > + { + static std::string + name() + { return ("linp_"); } + + static std::string + desc() + { return make_xml_tag("Probe_Fn", "value", "linear_probe_fn"); } + }; + + template + struct probe_fn_string_form > + { + static std::string + name() + { return ("quadp_"); } + + static std::string + desc() + { return make_xml_tag("Probe_Fn", "value", "quadratic_probe_fn"); } + }; + + template<> + struct probe_fn_string_form<__gnu_pbds::null_probe_fn> + { + static std::string + name() + { return (""); } + + static std::string + desc() + { return make_xml_tag("Probe_Fn", "value", "null_probe_fn"); } + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_PROBE_FN_STRING_FORM_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp new file mode 100644 index 000000000..8d5b68698 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp @@ -0,0 +1,93 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file resize_policy_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_RESIZE_POLICY_STRING_FORM_HPP +#define PB_DS_RESIZE_POLICY_STRING_FORM_HPP + +#include +#include +#include +#include +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct resize_policy_string_form; + + template + struct resize_policy_string_form< + __gnu_pbds::hash_standard_resize_policy< + Size_Policy, Trigger_Policy, External_Size_Access, Size_Type> > + { + static std::string + name() + { + return (size_policy_string_form::name() + + trigger_policy_string_form::name()); + } + + static std::string + desc() + { + const std::string size_policy_string_form_desc = + size_policy_string_form::desc(); + + const std::string trigger_policy_string_form_desc = + trigger_policy_string_form::desc(); + + return (make_xml_tag("Resize_Policy", "value", "hash_standard_resize_policy", size_policy_string_form_desc + trigger_policy_string_form_desc)); + } + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_RESIZE_POLICY_STRING_FORM_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp new file mode 100644 index 000000000..d2b61facb --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp @@ -0,0 +1,95 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file size_policy_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_SIZE_POLICY_STRING_FORM_HPP +#define PB_DS_SIZE_POLICY_STRING_FORM_HPP + +#include +#include +#include +#include +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct size_policy_string_form; + + template + struct size_policy_string_form< + __gnu_pbds::test::hash_exponential_size_policy_t_ > + { + static std::string + name() + { return ("exp_"); } + + static std::string + desc() + { + return (make_xml_tag("Size_Policy", "value", "hash_exponential_size_policy")); + } + }; + + template<> + struct size_policy_string_form< + __gnu_pbds::test::hash_prime_size_policy_t_> + { + static std::string + name() + { return ("prime_"); } + + static std::string + desc() + { + return (make_xml_tag("Size_Policy", "value", "hash_prime_size_policy")); + } + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_SIZE_POLICY_STRING_FORM_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp new file mode 100644 index 000000000..a932948fa --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp @@ -0,0 +1,82 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file store_hash_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_STORE_HASH_STRING_FORM_HPP +#define PB_DS_STORE_HASH_STRING_FORM_HPP + +#include +#include +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct store_hash_string_form + { + static std::string + name() + { return ("sth_"); } + + static std::string + desc() + { return (make_xml_tag("Store_Hash", "value", "true")); } + }; + + template<> + struct store_hash_string_form + { + static std::string + name() + { return ("nsth_"); } + + static std::string + desc() + { return (make_xml_tag("Store_Hash", "value", "false")); } + }; + + } // namespace detail + } // namespace test +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_STORE_HASH_STRING_FORM_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp new file mode 100644 index 000000000..80c1abe54 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp @@ -0,0 +1,73 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file tree_supports_order_statistics.hpp + * Checks whether a tree supports order statistics. + */ + +#ifndef PB_DS_TREE_SUPPORTS_ORDER_STATISTICS_HPP +#define PB_DS_TREE_SUPPORTS_ORDER_STATISTICS_HPP + +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct tree_supports_order_statistics + { + enum + { + value = __gnu_pbds::detail::is_same< + typename Tree_Cntnr::node_update, + __gnu_pbds::tree_order_statistics_node_update< + typename Tree_Cntnr::const_node_iterator, + typename Tree_Cntnr::node_iterator, + typename Tree_Cntnr::cmp_fn, + typename Tree_Cntnr::allocator_type> >::value + }; + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_TREE_SUPPORTS_ORDER_STATISTICS_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp new file mode 100644 index 000000000..fc9cacc63 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp @@ -0,0 +1,73 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file trie_supports_order_statistics.hpp + * Checks whether a trie supports order stats. + */ + +#ifndef PB_DS_TRIE_SUPPORTS_ORDER_STATISTICS_HPP +#define PB_DS_TRIE_SUPPORTS_ORDER_STATISTICS_HPP + +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct trie_supports_order_statistics + { + enum + { + value = __gnu_pbds::detail::is_same< + typename Tree_Cntnr::node_update, + __gnu_pbds::trie_order_statistics_node_update< + typename Tree_Cntnr::const_node_iterator, + typename Tree_Cntnr::node_iterator, + typename Tree_Cntnr::e_access_traits, + typename Tree_Cntnr::allocator_type> >::value + }; + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_TRIE_SUPPORTS_ORDER_STATISTICS_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp new file mode 100644 index 000000000..20c521010 --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp @@ -0,0 +1,73 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file trie_supports_prefix_search.hpp + * Checks whether a trie supports prefix search. + */ + +#ifndef PB_DS_TRIE_SUPPORTS_PREFIX_SEARCH_HPP +#define PB_DS_TRIE_SUPPORTS_PREFIX_SEARCH_HPP + +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct trie_supports_prefix_search + { + enum + { + value = __gnu_pbds::detail::is_same< + typename Tree_Cntnr::node_update, + __gnu_pbds::trie_prefix_search_node_update< + typename Tree_Cntnr::const_node_iterator, + typename Tree_Cntnr::node_iterator, + typename Tree_Cntnr::e_access_traits, + typename Tree_Cntnr::allocator_type> >::value + }; + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_TRIE_SUPPORTS_PREFIX_SEARCH_HPP + diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp new file mode 100644 index 000000000..be4fe264f --- /dev/null +++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp @@ -0,0 +1,141 @@ +// -*- C++ -*- + +// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License as published by the Free Software +// Foundation; either version 3, or (at your option) any later +// version. + +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING3. If not see +// . + + +// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. + +// Permission to use, copy, modify, sell, and distribute this software +// is hereby granted without fee, provided that the above copyright +// notice appears in all copies, and that both that copyright notice +// and this permission notice appear in supporting documentation. None +// of the above authors, nor IBM Haifa Research Laboratories, make any +// representation about the suitability of this software for any +// purpose. It is provided "as is" without express or implied +// warranty. + +/** + * @file trigger_policy_string_form.hpp + * Transforms containers into string form. + */ + +#ifndef PB_DS_TRIGGER_POLICY_STRING_FORM_HPP +#define PB_DS_TRIGGER_POLICY_STRING_FORM_HPP + +#include +#include +#include + +namespace __gnu_pbds +{ + + namespace test + { + + namespace detail + { + + template + struct trigger_policy_string_form; + + template + struct trigger_policy_string_form< + __gnu_pbds::test::hash_load_check_resize_trigger_t_< + Allocator, + Min_Load_Nom, + Min_Load_Denom, + Max_Load_Nom, + Max_Load_Denom, + External_Access> > + { + static std::string + name() + { + std::ostringstream ret; + + ret << (External_Access? "": "n") << "ea_" + "lc_" << Min_Load_Nom << "div" << Min_Load_Denom << "_" << + Max_Load_Nom << "div" << Max_Load_Denom << "_"; + + return (ret.str()); + } + + static std::string + desc() + { + const std::string ext_access_desc = + make_xml_tag("External_Access", + "value",(External_Access? "true" : "false")); + + const std::string loads_desc = + make_xml_tag("alpha_min", "nom", Min_Load_Nom, "denom", Min_Load_Denom) + + make_xml_tag("alpha_max", "nom", Max_Load_Nom, "denom", Max_Load_Denom); + + return (make_xml_tag("Trigger_Policy", "value", "hash_load_check_resize_trigger", ext_access_desc + loads_desc)); + } + }; + + template + struct trigger_policy_string_form< + __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_< + Allocator, + Load_Nom, + Load_Denom, + External_Access> > + { + static std::string + name() + { + std::ostringstream ret; + + ret << (External_Access? "": "n") << "ea_" + "mcolc_" << Load_Nom << "div" << Load_Denom << "_"; + + return (ret.str()); + } + + static std::string + desc() + { + const std::string ext_access_desc = + make_xml_tag("External_Access", + "value",(External_Access? "true" : "false")); + + const std::string load_desc = + make_xml_tag("alpha", "nom", Load_Nom, "denom", Load_Denom); + + return (make_xml_tag("Trigger_Policy", "value", "cc_hash_max_collision_check_resize_trigger", ext_access_desc + load_desc)); + } + }; + + } // namespace detail + + } // namespace test + +} // namespace __gnu_pbds + +#endif // #ifndef PB_DS_TRIGGER_POLICY_STRING_FORM_HPP + -- cgit v1.2.3