Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: [patch] row::operator[] - template version: msg#00072

db.mysql.c++

Subject: Re: [patch] row::operator[] - template version

On Sun, Sep 18, 2005 at 12:30:49PM -0400, pps wrote:
> >I'd be interested in what kind of errors the above patch could cause.
>
> I don't remember, but I really had to redo it :)
>
> >I suppose the template/non-template could confuse some compilers. If so,
> >we could get rid of non-template members completely, and make a
> >specialization
> >for the const char * version. That should work.
>
> The problem is that there's no such thing as partial template
> specialization for members. If you have two templates with the same
> signature, there's good chance a wrong template gets selected (resulting
> in compile error or worse, wrong code being executed). For control of
> instantiation of templates SFINAE (substitution-failure-is-not-an-error)
> principle used. enable_if exploits this thing.

Thanks for the detailed email. I had to read up on this to fully
understand it. Google's cache came in handy, as the most informative
site didn't respond: http://tinyurl.com/cemw6

But as you noted elsewhere in your email, we are not using this in a
templated class, so the only problem is that the template may match
more types than it should, for the integer case.

The good news is that the integer template case just calls row::at(),
which only has an integer argument. If I understand SFINAE correctly,
if the integer doesn't fit with at(), the template won't be considered.
It will fail with non-integer arguments in any case, which is fine. :-)

I don't know off hand, without testing, which style will produce the
clearest error messages for the user.


> >Could you run a test compile and let us know, on WinXP?
>
> I don't know how to compile it !!! :)
> I'll look around for the patch on the list to be able to compile it, or
> I'll create my own project files from zero...

The development site is: https://gna.org/projects/mysqlpp/
You can grab the latest makemake.bat file here:
http://svn.gna.org/viewcvs/mysqlpp/trunk/

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation