Well I read the standard, and it really more or less discusses what you *can't* use to initialize default parameters. Amongst that list I didn't see functions. And behold, it worked! I guess I don't need boost after all. All these years I kept thinking that only compile-time constants could be used to initialize default parameters. I never use default parameters anyway, so I can understand. Just goes to show that you learn new things every day, regardless of how obvious things are :) <br><br>Thanks guys.<br><br><div class="gmail_quote">On Dec 12, 2007 10:08 AM, Stjepan Rajko <<a href="mailto:stipe@asu.edu">stipe@asu.edu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On Dec 12, 2007 8:07 AM, Robert Dailey <<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>> wrote:<br>> Are function calls allowed to default initialize a construction parameter?<br>> Does the compiler turn the function into a constant? How does that work? I <br>> wasn't aware you could do this...<br>><br><br></div>I was asking the same questions, which is what prompted me to try to<br>find the answers in the standard. If you can get your hands on it<br>(I'm looking at ISO/IEC 14882:2003), section 8.3.6. talks about what<br>can and can't be used for default argument values. Anyway, the<br>compiler will evaluate the expression when the function is called, but<br>not all expressions are valid (the ones I put in the example should <br>be). If this doesn't work for you, you can always have two<br>constructors - one taking 4 arguments and one taking 3, initializing<br>the alpha value to just about anything.<br><br>I would suggest a C++ list or channel to get more info, we've strayed <br>a bit from Boost :-) But I found it helpful too.<br><br>Cheers,<br><div><div></div><div class="Wj3C7c"><br>Stjepan<br>_______________________________________________<br>Boost-users mailing list<br><a href="mailto:Boost-users@lists.boost.org"> Boost-users@lists.boost.org</a><br><a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br></div></div></blockquote></div><br>