X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libstdc%2B%2B-v3%2Finclude%2Fext%2Fpb_ds%2Fdetail%2Fhash_fn%2Franged_probe_fn.hpp;h=b665dbf36f8d9786685a5887cd6e94286ab8da5e;hp=d4b834dd34f39764cab83ad788d56e2bf2011b17;hb=22b8335ee3a8885549f54fc87ceede186565dd1a;hpb=df2f36b7157c61ab303f9fd7a2304a887b21a56b diff --git a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp index d4b834dd34f..b665dbf36f8 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp @@ -56,12 +56,8 @@ namespace pb_ds { namespace detail { - template + template class ranged_probe_fn; #define PB_DS_CLASS_T_DEC \ @@ -72,8 +68,9 @@ namespace pb_ds ranged_probe_fn /** - * Specialization 1- The client supplies a probe function and a ranged - * probe function, and requests that hash values not be stored. + * Specialization 1 + * The client supplies a probe function and a ranged probe + * function, and requests that hash values not be stored. **/ template @@ -83,37 +80,32 @@ namespace pb_ds { protected: typedef typename Allocator::size_type size_type; - typedef Comb_Probe_Fn comb_probe_fn_base; - typedef Hash_Fn hash_fn_base; - typedef Probe_Fn probe_fn_base; - typedef typename Allocator::template rebind::other key_allocator; - typedef typename key_allocator::const_reference const_key_reference; - protected: - ranged_probe_fn(size_type size); + ranged_probe_fn(size_type); - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn); + ranged_probe_fn(size_type, const Hash_Fn&); - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn); + ranged_probe_fn(size_type, const Hash_Fn&, const Comb_Probe_Fn&); - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn); + ranged_probe_fn(size_type, const Hash_Fn&, const Comb_Probe_Fn&, + const Probe_Fn&); void - swap(PB_DS_CLASS_C_DEC& other); + swap(PB_DS_CLASS_C_DEC&); void - notify_resized(size_type size); + notify_resized(size_type); inline size_type - operator()(const_key_reference r_key) const; + operator()(const_key_reference) const; inline size_type - operator()(const_key_reference r_key, size_type hash, size_type i) const; + operator()(const_key_reference, size_type, size_type) const; }; PB_DS_CLASS_T_DEC @@ -123,23 +115,23 @@ namespace pb_ds PB_DS_CLASS_T_DEC PB_DS_CLASS_C_DEC:: - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn) : - Hash_Fn(r_hash_fn) + ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn) + : Hash_Fn(r_hash_fn) { Comb_Probe_Fn::notify_resized(size); } PB_DS_CLASS_T_DEC PB_DS_CLASS_C_DEC:: - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn) : - Hash_Fn(r_hash_fn), - Comb_Probe_Fn(r_comb_probe_fn) + ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, + const Comb_Probe_Fn& r_comb_probe_fn) + : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn) { comb_probe_fn_base::notify_resized(size); } PB_DS_CLASS_T_DEC PB_DS_CLASS_C_DEC:: - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, const Probe_Fn& r_probe_fn) : - Hash_Fn(r_hash_fn), - Comb_Probe_Fn(r_comb_probe_fn), - Probe_Fn(r_probe_fn) + ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, + const Comb_Probe_Fn& r_comb_probe_fn, + const Probe_Fn& r_probe_fn) + : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn), Probe_Fn(r_probe_fn) { comb_probe_fn_base::notify_resized(size); } PB_DS_CLASS_T_DEC @@ -175,8 +167,8 @@ namespace pb_ds #undef PB_DS_CLASS_C_DEC #define PB_DS_CLASS_T_DEC \ - template + template #define PB_DS_CLASS_C_DEC \ ranged_probe_fn @@ -193,44 +185,37 @@ namespace pb_ds { protected: typedef typename Allocator::size_type size_type; - - typedef typename comp_hash_::comp_hash comp_hash; - + typedef std::pair comp_hash; typedef Comb_Probe_Fn comb_probe_fn_base; - typedef Hash_Fn hash_fn_base; - typedef Probe_Fn probe_fn_base; - typedef typename Allocator::template rebind::other key_allocator; - typedef typename key_allocator::const_reference const_key_reference; - ranged_probe_fn(size_type size); + ranged_probe_fn(size_type); - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn); + ranged_probe_fn(size_type, const Hash_Fn&); - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, - const Comb_Probe_Fn& r_comb_probe_fn); + ranged_probe_fn(size_type, const Hash_Fn&, + const Comb_Probe_Fn&); - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, - const Comb_Probe_Fn& r_comb_probe_fn, - const Probe_Fn& r_probe_fn); + ranged_probe_fn(size_type, const Hash_Fn&, const Comb_Probe_Fn&, + const Probe_Fn&); void - swap(PB_DS_CLASS_C_DEC& other); + swap(PB_DS_CLASS_C_DEC&); void - notify_resized(size_type size); + notify_resized(size_type); inline comp_hash - operator()(const_key_reference r_key) const; + operator()(const_key_reference) const; inline size_type - operator()(const_key_reference r_key, size_type hash, size_type i) const; + operator()(const_key_reference, size_type, size_type) const; inline size_type - operator()(const_key_reference r_key, size_type hash) const; + operator()(const_key_reference, size_type) const; }; PB_DS_CLASS_T_DEC @@ -240,26 +225,23 @@ namespace pb_ds PB_DS_CLASS_T_DEC PB_DS_CLASS_C_DEC:: - ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn) : - Hash_Fn(r_hash_fn) + ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn) + : Hash_Fn(r_hash_fn) { Comb_Probe_Fn::notify_resized(size); } PB_DS_CLASS_T_DEC PB_DS_CLASS_C_DEC:: ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, - const Comb_Probe_Fn& r_comb_probe_fn) : - Hash_Fn(r_hash_fn), - Comb_Probe_Fn(r_comb_probe_fn) + const Comb_Probe_Fn& r_comb_probe_fn) + : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn) { comb_probe_fn_base::notify_resized(size); } PB_DS_CLASS_T_DEC PB_DS_CLASS_C_DEC:: ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn, const Comb_Probe_Fn& r_comb_probe_fn, - const Probe_Fn& r_probe_fn) : - Hash_Fn(r_hash_fn), - Comb_Probe_Fn(r_comb_probe_fn), - Probe_Fn(r_probe_fn) + const Probe_Fn& r_probe_fn) + : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn), Probe_Fn(r_probe_fn) { comb_probe_fn_base::notify_resized(size); } PB_DS_CLASS_T_DEC @@ -312,8 +294,9 @@ namespace pb_ds #undef PB_DS_CLASS_C_DEC /** - * Specialization 3 and 4- The client does not supply a hash function or - * probe function, and requests that hash values not be stored. + * Specialization 3 and 4 + * The client does not supply a hash function or probe function, + * and requests that hash values not be stored. **/ template class ranged_probe_fn::other key_allocator; - typedef typename key_allocator::const_reference const_key_reference; ranged_probe_fn(size_type size) { Comb_Probe_Fn::notify_resized(size); } - ranged_probe_fn(size_type size, const Comb_Probe_Fn& r_comb_probe_fn) + ranged_probe_fn(size_type, const Comb_Probe_Fn& r_comb_probe_fn) : Comb_Probe_Fn(r_comb_probe_fn) { } - ranged_probe_fn(size_type size, const null_hash_fn& r_null_hash_fn, + ranged_probe_fn(size_type, const null_hash_fn&, const Comb_Probe_Fn& r_comb_probe_fn, - const null_probe_fn& r_null_probe_fn) + const null_probe_fn&) : Comb_Probe_Fn(r_comb_probe_fn) { }