libstdc++: resize_store_hash_fn_imps.hpp Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42#ifdef PB_DS_CLASS_C_DEC

43

44PB_DS_CLASS_T_DEC

45inline void

46PB_DS_CLASS_C_DEC::

47resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized,

48 true_type)

49{

50 key_const_reference r_key = PB_DS_V2F(p_e->m_value);

51 size_type hash = ranged_probe_fn_base::operator()(r_key, p_e->m_hash);

52

53 size_type i;

54 for (i = 0; i < m_num_e; ++i)

55 {

56 const size_type pos = ranged_probe_fn_base::operator()(r_key, hash, i);

57 entry_pointer p_new_e = a_entries_resized + pos;

58 switch(p_new_e->m_stat)

59 {

60 case empty_entry_status:

61 new (&p_new_e->m_value) value_type(p_e->m_value);

62 p_new_e->m_hash = hash;

63 p_new_e->m_stat = valid_entry_status;

64 return;

65 case erased_entry_status:

66 _GLIBCXX_DEBUG_ASSERT(0);

67 break;

68 case valid_entry_status:

69 break;

70 default:

71 _GLIBCXX_DEBUG_ASSERT(0);

72 };

73 }

74 __throw_insert_error();

75}

76

77#endif