<div>John,</div>
<div> </div>
<div>Sorry, I missed seeing your post.</div>
<div> </div>
<div>A vecreturn class can only have one member, which must be a vector, because it's for telling the compiler to store the whole class in a vector register, for optimization, and thus can only fit one member (unless we extend it to span multiple registers).</div>
<div> </div>
<div>-John</div>
<div> </div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>> Doug,<br>> <br>> I'm afraid I don't know the appropriate compiler terms to explain it<br>> most correctly. Basically, the main idea for the attribute is to<br>> optimize a class that has one data member, which must be a vector, such<br>
> that the whole object can be stored in a vector register, thus avoiding<br>> referencing memory. Therefore, anything that would add extra storage,<br>> such as a vtable pointer would have to be detected. I don't know that<br>
> that would preclude multiple inheritance, but I would imagine it<br>> wouldn't make sense to have multiple base classes that don't add data<br>> members or virtual functions. I was thinking that just checking for a<br>
> vtable and only one member which must be a vector would be sufficient.<br><br>Is it really important that it have one member? If you hadn't said that<br>I'd suggest that the correct thing to check was whether it has a trivial<br>
copy constructor.<br><br>John Bytheway<br><br clear="all"></div></blockquote><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br>