List:MySQL++« Previous MessageNext Message »
From:<alan.alvarez Date:March 20 2006 2:46pm
Subject:Re: Row::at() doesn't take const int?
View as plain text  
Doing something like Row[1] will produce a compile-time error. Since 1 is created as a
constant by the compiler. The compiler won't explicitely cast from non-const to const. it
will, however, do the opposite. So I think it'd be better to take a constant since the
value is not modified anyways, or so I think. I could be wrong, which is why I was
asking.

Respectfully,
Alan Alvarez.

----- Original Message -----
From: Warren Young <mysqlpp@stripped>
Date: Monday, March 20, 2006 3:28 pm
Subject: Re: Row::at() doesn't take const int?

> alan.alvarez@stripped wrote:
> > Is there a reason why Row::at() doesn't take constant unsigned ints?
> > same with the [] operator.
> 
> Since size_type is a typedef for unsigned int, I guess you're 
> complaining that it isn't const?  What value could making it const 
> possibly provide?  Constness only matters with reference and 
> pointer 
> parameters.
> 
> -- 
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:    
> http://lists.mysql.com/plusplus?unsub=1
Thread
Row::at() doesn't take const int?alan.alvarez18 Mar
  • Re: Row::at() doesn't take const int?Warren Young20 Mar
Re: Row::at() doesn't take const int?alan.alvarez20 Mar
  • Re: Row::at() doesn't take const int?Pedro LamarĂ£o20 Mar
  • Re: Row::at() doesn't take const int?Warren Young20 Mar
  • Re: Row::at() doesn't take const int?Johannes Schaub21 Mar
    • Re: Row::at() doesn't take const int?Warren Young21 Mar
Re: Row::at() doesn't take const int?alan.alvarez20 Mar
  • Re: Row::at() doesn't take const int?Pedro LamarĂ£o21 Mar
  • Re: Row::at() doesn't take const int?Warren Young21 Mar