Boost C++ Libraries: Ticket #8082: Unused function w32_cat_get() in regex https://svn.boost.org/trac10/ticket/8082 <p> I think w32_cat_get() in w32_regex_traits.cpp is unused by regex.<br /> w32_cat_get() calls LoadStringA() and LoadStringW() of USER32.dll.<br /> If w32_cat_get() is deleted, libboost_regex-*.lib can link to just only KERNEL32.dll.<br /> </p> <p> If w32_cat_get() remains, I think revision is necessary.<br /> Destination buffer of WideCharToMultiByte() in w32_regex_traits.cpp may be shortage,<br /> because not a letter of all MultiByte-CodePages are in 2 bytes.<br /> Constant value <strong>MB_LEN_MAX</strong> should be instead of <strong>2</strong>.<br /> MB_LEN_MAX is in &lt;climits&gt; header.<br /> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8082 Trac 1.4.3 anonymous Fri, 19 Apr 2013 16:46:18 GMT <link>https://svn.boost.org/trac10/ticket/8082#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8082#comment:1</guid> <description> <p> The functions are potentially called from the header. </p> <p> I'll change the code to let <a class="missing wiki">WideCharToMultiByte</a> itself determine the buffer size. </p> <p> BTW <a class="missing wiki">WideCharToMultiByte</a> is only used on systems with no narrow character Win32 API's such as WinCE. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 19 Apr 2013 17:45:29 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8082#comment:2 https://svn.boost.org/trac10/ticket/8082#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83967" title="Fix buffer size determination. Fixes #8082.">[83967]</a>) Fix buffer size determination. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8082" title="#8082: Bugs: Unused function w32_cat_get() in regex (closed: fixed)">#8082</a>. </p> Ticket