This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14912] Do not print default template arguments in error messages



------- Comment #40 from pluto at agmk dot net  2008-09-22 21:54 -------
(In reply to comment #39)
> Created an attachment (id=16380)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16380&action=view) [edit]
> Updated fixed
> 

1). still there is a warning:

../../gcc/cp/error.c: In function 'dump_template_argument_list':
../../gcc/cp/error.c:190: warning: signed and unsigned type in conditional
expression

2). seems to work, but...

#include <set>
#include <string>
template < typename T, typename S = std::set< std::string >, int N = 1 >
struct X
{
        virtual ~X() = 0;
};
void f()
{
        X< float > x;  // error here.
}

$ g++ d2.cpp -c
d2.cpp: In function &#8216;void f()&#8217;:
d2.cpp:10: error: cannot declare variable &#8216;x&#8217; to be of abstract
type &#8216;X<float>&#8217;
d2.cpp:5: note:   because the following virtual functions are pure within
&#8216;X<float>&#8217;:
d2.cpp:6: note:         X<T, S, N>::~X() [with T = float, S =
std::set<std::basic_string<char> >, int N = 1]

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 d2.cpp:6: note could look like 'X<T, S, N>::~X() [with T = float]'


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14912


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]