This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: explicit not working with template
- To: cheath at math dot lsa dot umich dot edu
- Subject: Re: explicit not working with template
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 24 Feb 2000 22:52:35 +0100
- CC: egcs-bugs at egcs dot cygnus dot com
- References: <Pine.SOL.3.96-4hack.990519193037.22985A-100000@vanceulen.math.lsa.umich.edu>
> As far as I know, the following shouldn't compile, because the explicit
> keyword should prevent the int being converted into type A. The explicit
> keyword seems only to work when the constructor is not a template.
Thanks for your bug report. The mainline compiler (2.96 20000223
(experimental)) says
a.cc: In function `int main ()':
a.cc:7: conversion from `int' to non-scalar type `A' requested
so it appears the bug has been fixed.
Regards,
Martin