473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

one more function template bug in VC 2003

Please could someone verify if this bug is fixed in VS 2005? (the code
should compile, but it doesn't in VC 2003)

Thanks, Stefan
template <typename DerivedT>
struct base
{
template <typename T>
DerivedT f (T const&) const
{
return DerivedT();
}
};

struct derived : public base<derived>
{
};

derived d;
// error C2027: use of undefined type 'derived'
Nov 17 '05 #1
2 885
>Please could someone verify if this bug is fixed in VS 2005? (the code
should compile, but it doesn't in VC 2003)


It's still the same with the VS2005 B1 compiler.

It compiles OK with the Comeau online compiler, so I recommend that
you submit a bug report on this at:

http://lab.msdn.microsoft.com/produc...k/default.aspx

When you've done so, please reply here with the link to your report
and I'll add a vote to it.

Dave
Nov 17 '05 #2
David Lowndes wrote:

It's still the same with the VS2005 B1 compiler.

It compiles OK with the Comeau online compiler, so I recommend that
you submit a bug report on this at:

http://lab.msdn.microsoft.com/produc...k/default.aspx

When you've done so, please reply here with the link to your report
and I'll add a vote to it.


This has already been reported and should be fixed in Beta 2, see bug
report FDBK18114.

Stefan
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave Theese | last post by:
Hello all, I'm trying to get a grasp of the difference between specializing a function template and overloading it. The example below has a primary template, a specialization and an overload. ...
12
by: Surya Kiran | last post by:
Hi all, I've written a function template. say template <class T> fn (T var) { ... } Is there any way, from within the function, can we check what type of argument we've passed on to the...
5
by: Arkadiy Vertleyb | last post by:
Hi all, I am having a problem trying to overload a function template, based on a typedef, such as: template<class T> struct A {}; template<class T>
13
by: al | last post by:
1. If a function template is defined: template <typename A> A SQ(A& a) { return a*a; } How could prevent users from passing a type which makes no sense, like Employee class type?
4
by: Zoran Stipanicev | last post by:
Hi! I have a code that looks some thing like this void function() { struct st1 { template<...> struct st2 {
3
by: Fiber Optic | last post by:
I wrote a sample app to test using a function to obtain friend-level access to a templated class. However, I am getting similar errors from two separate compilers. If anyone can recommend what...
6
by: Ryan Muller | last post by:
My company just upgraded from Access 97 to Access 2003 today and we are having some issues in a database that generates a Word document from information selected in a form. Here is the code we...
0
by: Daniel G?rsch | last post by:
The following code works perfect in VS 2002 (compiled in a console project). Using VS 2003 the variable 'a' in the 'compute' function of the managed class 'M' is not correctly passed into this...
7
by: quarup | last post by:
I want to specialize a template function that lives inside a class, but am getting a compile error in VS.net 2003. Here's my code: template <class T> class A { public: template <class U> void...
8
by: William Xu | last post by:
Compiling: template <class T = int> T foo(const T& t) {} int main(int argc, char *argv) {} gcc complains:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.