<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Hello, everyone,</div><div><br></div><div>I created a dense map like this: DenseMap<Loop *, int> ls;</div><div>And I have a module which contains 3 functions:</div><div>function F and it has a loop which is "<span style="font-family: Menlo; font-size: 11px;">Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch></span><span style="font-size: 12pt;">"</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">function G and it has two loops which are "</span></span><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">Loop at depth 1 containing: %8<header><exiting>,%10,%14<latch></p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch></p><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">"</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">function main and it has 3 loops which are "</span></span><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">Loop at depth 1 containing: %17<header><exiting>,%19,%23<latch></p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">Loop at depth 1 containing: %8<header><exiting>,%10,%14<latch</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch></p><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">"</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Then I tried to insert these loops into ls and the expected result is that there are 6 items in ls after the insertion. </span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">But I got only 3.</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">So my question is why this happened? </span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">The dense map uses the name of the loop to check if the element is in it?</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Is there anything wrong during my code?</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Looking forward to your answer.</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Thank you</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Sincerely,</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Hanbing</span></div></div></body></html>