Warren Young wrote:
> Warren Young wrote:
>>
>> The second parameter should...be "NOW()"
>
> Thinking more about this, I wonder if MySQL++ should provide such a
> thing?
>
> #define NOW() mysqlpp::DateTime()
>
> is dangerous in that it puts a 3-letter word at global scope, so
> there's a good chance of name collision.
>
No, no, a thousand times no! Er, I agree with your assessment.
> namespace mysqlpp {
> inline DateTime NOW() { return DateTime(); }
> }
>
> is inefficient, but it probably doesn't matter, and it fixes the
> global symbol problem.
>
Why is this inefficient? Won't the compiler inline it so the net result
is the same as a #define, minus being in the mysqlpp namespace?
Rick