| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Dbstl known issues</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> |
| 10 | <link rel="up" href="stl.html" title="Chapter 7. Standard Template Library API" /> |
| 11 | <link rel="prev" href="stl_misc.html" title="Dbstl miscellaneous notes" /> |
| 12 | <link rel="next" href="arch.html" title="Chapter 8. Berkeley DB Architecture" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Dbstl known issues</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="stl_misc.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 7. Standard Template Library API</th> |
| 26 | <td width="20%" align="right"> <a accesskey="n" href="arch.html">Next</a></td> |
| 27 | </tr> |
| 28 | </table> |
| 29 | <hr /> |
| 30 | </div> |
| 31 | <div class="sect1" lang="en" xml:lang="en"> |
| 32 | <div class="titlepage"> |
| 33 | <div> |
| 34 | <div> |
| 35 | <h2 class="title" style="clear: both"><a id="stl_known_issues"></a>Dbstl known issues</h2> |
| 36 | </div> |
| 37 | </div> |
| 38 | </div> |
| 39 | <p> |
| 40 | Three algorithm functions of gcc's C++ STL test suite do not work with dbstl. They are |
| 41 | <code class="function">find_end()</code>, <code class="function">inplace_merge()</code> and |
| 42 | <code class="function">stable_sort()</code>. |
| 43 | </p> |
| 44 | <p> |
| 45 | The reason for the incompatibility of <code class="function">find_end()</code> is that it assumes the |
| 46 | data an iterator refers to is located at a shared place (owned by its container). This |
| 47 | assumption is not correct in that it is part of the C++ STL standards specification. However, |
| 48 | this assumption can not be true for dbstl because each dbstl container iterator caches its |
| 49 | referenced value. |
| 50 | </p> |
| 51 | <p> |
| 52 | Consequently, please do not use <code class="function">find_end()</code> for dbstl container iterators if |
| 53 | you are using gcc's STL library. |
| 54 | </p> |
| 55 | <p> |
| 56 | The reason for the incompatibility with <code class="function">inplace_merge()</code> and |
| 57 | <code class="function">stable_sort()</code> is that their implementation in gcc requires the |
| 58 | <span class="bold"><strong>value_type</strong></span> for a container to be default constructible. This |
| 59 | requirement is not a part of the the C++ STL standard specification. Dbstl's value type |
| 60 | wrappers (such as <code class="classname">ElementHolder</code>) do not support it. |
| 61 | </p> |
| 62 | <p> |
| 63 | These issues do not exist for any function available with the Microsoft |
| 64 | Visual C++ 8 STL library. There are two algorithm functions of Microsoft |
| 65 | Visual C++ 10 STL library that do have an issue: |
| 66 | <code class="function">partial_sort()</code> and |
| 67 | <code class="function">partial_sort_copy()</code>. These are not compatible because they |
| 68 | require the dbstl <code class="literal">vector</code> iterator to create a new |
| 69 | element when updating the current element. Dbstl |
| 70 | <code class="literal">vector</code> iterator can copy the new content to the |
| 71 | current element, but it cannot create a new one. This requirement is |
| 72 | not a part of the C++ STL standard specification, and so dbstl's |
| 73 | <code class="literal">vector</code> iterator does not support it. |
| 74 | </p> |
| 75 | </div> |
| 76 | <div class="navfooter"> |
| 77 | <hr /> |
| 78 | <table width="100%" summary="Navigation footer"> |
| 79 | <tr> |
| 80 | <td width="40%" align="left"><a accesskey="p" href="stl_misc.html">Prev</a> </td> |
| 81 | <td width="20%" align="center"> |
| 82 | <a accesskey="u" href="stl.html">Up</a> |
| 83 | </td> |
| 84 | <td width="40%" align="right"> <a accesskey="n" href="arch.html">Next</a></td> |
| 85 | </tr> |
| 86 | <tr> |
| 87 | <td width="40%" align="left" valign="top">Dbstl miscellaneous notes </td> |
| 88 | <td width="20%" align="center"> |
| 89 | <a accesskey="h" href="index.html">Home</a> |
| 90 | </td> |
| 91 | <td width="40%" align="right" valign="top"> Chapter 8. |
| 92 | Berkeley DB Architecture |
| 93 | </td> |
| 94 | </tr> |
| 95 | </table> |
| 96 | </div> |
| 97 | </body> |
| 98 | </html> |