<html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></head><body><div><div style="font-family:Calibri,sans-serif;font-size:11pt">I've had the same thought but never got around to trying to implement it. Does everything compile for you if it's protected? If so, then a patch would probably be happily accepted <br>
</div></div><hr><span style="font-family:Tahoma,sans-serif;font-size:10pt;font-weight:bold">From: </span><span style="font-family:Tahoma,sans-serif;font-size:10pt">Vane, Edwin</span><br><span style="font-family:Tahoma,sans-serif;font-size:10pt;font-weight:bold">Sent: </span><span style="font-family:Tahoma,sans-serif;font-size:10pt">1/20/2012 7:13 AM</span><br>
<span style="font-family:Tahoma,sans-serif;font-size:10pt;font-weight:bold">To: </span><span style="font-family:Tahoma,sans-serif;font-size:10pt"><a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a></span><br><span style="font-family:Tahoma,sans-serif;font-size:10pt;font-weight:bold">Subject: </span><span style="font-family:Tahoma,sans-serif;font-size:10pt">[LLVMdev] Public SmallVectorImpl constructor?</span><br>
<br></body></html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-CA">Hi all,</span></p>
<p class="MsoNormal"><span lang="EN-CA"> </span></p>
<p class="MsoNormal"><span lang="EN-CA">Just finished debugging a memory clobbering bug resulting from using SmallVectorImpl directly without realizing this is a bad idea (aside: I was using it directly because llvm::sys::path::append()’s first argument is
 a SmallVectorImpl<char>). A note in the docs about not using SmallVectorImpl directly would be nice but could we go further and make SmallVectorImpl’s constructors not public? Is there a  reason why they’re public right now?</span></p>

<p class="MsoNormal"><span lang="EN-CA"> </span></p>
<p class="MsoNormal"><span style="color:#1f497d">--</span></p>
<p class="MsoNormal"><span style="color:#1f497d">Edwin Vane</span></p>
<p class="MsoNormal"><span style="color:#1f497d">  Software Developer</span></p>
<p class="MsoNormal"><span style="color:#1f497d">  SSG/DPD/ECDL/ArBB</span></p>
<p class="MsoNormal"><span style="color:#1f497d">  Phone: +1 519 772 2567</span></p>
<p class="MsoNormal"><span style="color:#1f497d">  iNET: 87722567</span></p>
<p class="MsoNormal"><span lang="EN-CA"> </span></p>
</div>
</body>
</html>