Good morning,
i found small difference between gcc and visual studio when looking up
a
dependent name. Consider:
struct Base {
template<typena me T, typename U>
void Implement (T t) { }
};
template<typena me T, class BaseT>
struct Derived : BaseT {
template<typena me U, typename V>
void foo (U u) {
//Implement<U,V>( u); // vs8, vs9 ok, gcc 3+ error
this->template Implement<U,V>( u); // vs ok, gcc ok
}
};
int main() {
Derived<int, Baseb;
b.foo<float, long>(1.0f);
}
It seems to me that gcc is right, because according standard the
Implement
method is a dependent name and therefore has to be accessed using this-
>, hasn't it?
Mojmir 3 1742
mojmir wrote:
Good morning,
i found small difference between gcc and visual studio when looking up
a
dependent name. Consider:
struct Base {
template<typena me T, typename U>
void Implement (T t) { }
};
template<typena me T, class BaseT>
struct Derived : BaseT {
template<typena me U, typename V>
void foo (U u) {
//Implement<U,V>( u); // vs8, vs9 ok, gcc 3+ error
this->template Implement<U,V>( u); // vs ok, gcc ok
}
};
int main() {
Derived<int, Baseb;
b.foo<float, long>(1.0f);
}
It seems to me that gcc is right, because according standard the
Implement
method is a dependent name and therefore has to be accessed using this-
>, hasn't it?
http://womble.decadentplace.org.uk/c...html#two-phase has
some information on this.
Alan
mojmir wrote:
:: Good morning,
::
:: i found small difference between gcc and visual studio when
:: looking up a
:: dependent name. Consider:
::
:: struct Base {
:: template<typena me T, typename U>
:: void Implement (T t) { }
:: };
::
:: template<typena me T, class BaseT>
:: struct Derived : BaseT {
:: template<typena me U, typename V>
:: void foo (U u) {
:: //Implement<U,V>( u); // vs8, vs9 ok, gcc 3+
:: error this->template Implement<U,V>( u); // vs ok, gcc ok
:: }
:: };
::
:: int main() {
:: Derived<int, Baseb;
:: b.foo<float, long>(1.0f);
:: }
::
:: It seems to me that gcc is right, because according standard the
:: Implement
:: method is a dependent name and therefore has to be accessed using
:: this-, hasn't it?
Yes, and VS8 and VS9 will do that as well, if you ask it to (option
/Za).
Bo Persson
On Nov 9, 9:46 pm, "Bo Persson" <b...@gmb.dkwro te:
Yes, and VS8 and VS9 will do that as well, if you ask it to (option
/Za).
oh, it's not a bug, it's a feature.. "whadda mistake-a to make-a" :)
thanks for pointing that out, i am quite new to visual studio.
mojmir This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Girish Srinivasan |
last post by:
Hello
In continuation with my previous thread regarding possibilities of compiling in Visual Studio .NET environment and linking using Visual Studio 6.0, I had one more question. I got some replies stating this would not work well. I was wondering if I am building plain Win32 application and not using any .NET capabilities will it still be a problem. It is just that I am using the .net environment. Since Visual Studio 6 provides a full win32...
|
by: Anton Noll |
last post by:
We are using Visual Studio 2003.NET (C++) for the development
of our software in the fields digital signal processing and
numerical acoustics.
One of our programs was working correctly if we are using the
Debug-Version of the program, but it fails (or leads to false
results) if we are using the Release-Version. After a long
debugging session we found out, that our program was working
correctly, but the floating point processing...
|
by: Will Chamberlain |
last post by:
I came across a rather interesting article this morning and thought I'd
share. We all know that Visual Studio is a great IDE, but I think we can
all agree that it is adds a dramatic change to how we write code.
I'm not posting to talk trash or start a flamewar, just wanting feedback
in regards to the following article. I happen to use Visual Studio on a
daily basis and am not a John Rivers alter-ego.
...
|
by: Andy |
last post by:
This is driving me to insanity!!!
I do not have a lot of experience with IIS which probably is not helping but
as far as I can tell I am do things as per the MSDN documentation.
I have a solution in Source Safe that I want to add some web service
projects to.
I create a folder under my solution folder for the new web service project.
I create a virtual directory using IIS and accept the default settings for
security etc.
|
by: m.roello |
last post by:
In the book:
"Working with Microsoft Visual Studio 2005"
Craig Skibo wrote:
"The power of Visual Studio 2005 lies in its ability to empower users to
build, test, and debug powerful applications quickly and easly."
I don't agree on what concernes ASP .NET Web Sites in VS2005.
All what involves Namespaces in Web sites has been disappeared. I know
you can still MANUALLY manage them, but not QUICKLY and EASLY. In a
| |
by: fiona |
last post by:
Innovasys Ltd., a leader in help authoring and documentation tools,
today announced the inclusion of a tailored version of the Innovasys
HelpStudio help authoring product, HelpStudio Lite, in the Microsoft
Visual Studio 2005 Software Development Kit. By providing a full help
authoring environment within the Visual Studio 2005 SDK, Innovasys is
providing developers building components and products that integrate
with Visual Studio 2005 a...
|
by: m11533 |
last post by:
I am developing a large application with Visual Studio .NET 2003 using C#. We
recently added a new third party product with a native .NET library. I want
to place this third party product's dll in a VS Project of its own, and then
reference that project from those c# projects in my solution that are
dependent on the third party product.
I created a c# class library project, ThirdPartyDll. Placed the dll file in
question into that...
|
by: bharathreddy |
last post by:
This Article gives an introduction to VSTS Team Foundation & fundamental difference between Visual Source Safe (VSS) and VSTS Team Foundation.
Team Foundation is a set of tools and technologies that enable a team to collaborate and coordinate a project (software or non software projects). The team collaboration is achieved by several tools and features available as part of "Team Foundation".
Team Foundation Server
The Team...
|
by: =?Utf-8?B?R2Vvcmdl?= |
last post by:
Hello everyone,
If I am using Visual Studio 2005 to build a C# Class Library (COM), it is as
default dependent on .Net Runtime Framework 2.0 when running?
If I am using Visual Studio 2003 to build a C# Class Library (COM), it is as
default dependent on .Net Runtime Framework 1.1 when running?
How to check the .Net Framework Runtime dependencies when using Visual Studio?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |