I was just wondering. After all these years of working on
Visual C++, why hasn't Microsoft yet seen fit to fully
implement the template portion of the C++ standard when so
many other vendors, both free and commercial, have, or at
least have come very close to doing so. I write code in
pure C++ and I so often have to ifdef the heck out of my
code just to get it to work in Visual C++.
Here is a simple example of what I mean:
#ifdef _WIN32
template<typena me T,
template<typena me Element,
typename Alloc = std::allocator< ELEM> >
class Container = std::deque >
class Stack
{
Container<T,std ::allocator<T> > m_elems;
#else
template<typena me T,
template<typena me Element,
typename = std::allocator< ELEM> >
class Container = std::deque >
class Stack
{
Container<T> m_elems;
#endif
Note how under the _WIN32 code I need to name Alloc rather
than just setting the second typename's default, and of
course in the body, VC++ ignores the default an I have to
explicitly define Container with the element type and the
allocator type. This is just messy.
So, does anyone know why Microsoft just hasn't hired a
template expert to implement templates correctly? I
suppose that they are just trying to kill C++ as well as
everything not invented by them. Ah well. It'll be a C#
world after all. Ugggg.
Thomas J. Clancy
Nov 16 '05
13 1505
"Brandon Bray [MSFT]" <br******@onlin e.microsoft.com > wrote: Hendrik Schober wrote: I've never used Loki. However, I'm doing some template metaprogramming myself nowadays (which does include some stuff I learned from MCD) and I do run into ICEs. I can surely imagine that, using Loki, one runs into compiler bugs as well. Hi Hendrik, As Ronald said, we harnessed Loki before we shipped VC7.1. The version available built without error.
And what does that mean? You can parse the
headers? No big deal in this millenium, when
you don't even lookup non-dependend names.
It's not that VC71 ICEs with simple or even
more complicated templates. But when you use
stuff like this all the time, you'll find
errors.
It is possible that changes made to Loki since 7.1 shipped now cause errors, but looking through our bug database there are no active or postponed issues regarding Loki.
I don't know, since I don't use Loki. But
since Loki uses quite advanced template
stuff, I'm sure using it one would run
into errors similar to the ones I find.
If you are coming across ICEs on your own, they really need to be reported. Otherwise, it makes it impossible to fix them.
If I can get something to reproduce, I post
it here. Sometimes, however, I cannot find
the time to cut it down to a repro case or
even to find out whether it's my fault (and
one of the other compilers I use) or VC's.
Then I simply need something that works ASAP.
If these are bugs, you won't hear them from
me.
(Also as someone else already has complained
about, I have no idea where the bugs should
go offically. All I can find is the payed
support. Yes, I know that you won't charge
if I found a real bug in your product. But
my boss isn't going to take this risc twice
a month. I think that's the same with other
bosses. So whoever doesn't use these newsgroup
won't report bugs that way, no matter how
serious they are.
I really think there should be an easier way
to report bugs. Because that will help you to
fix your product.)
Cheerio!
Prost! <g>
Brandon Bray Visual C++ Compiler
Schobi
-- Sp******@gmx.de is never read
I'm Schobi at suespammers org
"And why should I know better by now/When I'm old enough not to?"
Beth Orton
Patrik Ellren wrote: This might not be relevant to your discussion, but one area where I feel you can get better is to provide a simple method of reporting bugs and browsing already reported ones.
Hi Patrik,
I certainly understand your desire. I have certainly advocated this to as
many people as I can. There are plans to improve this in future products (we
actually have an entire team devoted to this kind of thing). I'm sure over
time it will get much better.
The best advice I have for now is to get involved with beta releases as soon
as possible. The sooner a bug is reported in a beta, the easier it is for us
to fix it.
Thanks for providing your feedback. Cheerio!
--
Brandon Bray Visual C++ Compiler
This posting is provided AS IS with no warranties, and confers no rights.
Brandon Bray [MSFT] wrote: Patrik Ellren wrote: This might not be relevant to your discussion, but one area where I feel you can get better is to provide a simple method of reporting bugs and browsing already reported ones.
Hi Patrik, I certainly understand your desire. I have certainly advocated this to as many people as I can. There are plans to improve this in future products (we actually have an entire team devoted to this kind of thing). I'm sure over time it will get much better.
The best advice I have for now is to get involved with beta releases as soon as possible. The sooner a bug is reported in a beta, the easier it is for us to fix it.
To add to what Brandon said -
Many regulars on these ngs (including many MVPs and all VC team members)
will be participating in any beta programs that are ongoing - so posting on
the newsgroups is more effective than you might think at getting bugs
noticed. I, and I assume many others, try to keep an eye out for things
reported on the ngs about current product that may be applicable to ongoing
beta programs. Whever I see such a posting, if I can reproduce the problem
with whatever beta I might have access to, I'll report the bug to the beta
program.
Of course, getting involved with the beta programs yourself offers you a
more direct route into the process. Knowledgebase article 33814 outlines
the process by which you can apply to be a beta tester. http://support.microsoft.com/default...kb;en-us;33814
-cd
"Carl Daniel [VC++ MVP]" <cp******@nospa m.mvps.org> wrote: [...] I, and I assume many others, try to keep an eye out for things reported on the ngs about current product that may be applicable to ongoing beta programs. Whever I see such a posting, if I can reproduce the problem with whatever beta I might have access to, I'll report the bug to the beta program.
This is all very great and I know that I own a
lot to the MVPs here. (I'm sure you reproduced
and reported 90% of all the issues I ever posted
here.)
I know that here is a great place to report bugs.
However, if you just think of how many copies of
VC are sold, and how many people post here, you
will have to agree that the overwhelming majority
of VC users never show up here. (Actually, that
is pretty good, as I have problems with this
group's posting volume anyway...)
All those users, if they find a problem, and try
to report it, either find these newsgroups, but
don't want to post, or don't find anything at
all.
Thinking of how I searched the website before I
found these groups, I suspect they never find
anything but the payed-per-incidence service and
give up.
What I expect is, on the VC website, a link
"Report bug", that leads to a form which I can
fill in, hit the sent button, and get an ID back,
that I can then use to track the bug's status
later on. And if the bug's status ever says
"can't reproduce" or something ugly, I need a
link right there that allows me to provide
further information (or probably will get me
into contact with a human beeing) to re-open
the bug.
Heck, this all could probably even be found in
VS' help menu!
I know that this could bring in a lot of false
reports and I know that this is a problem.
However, we're not talking Word or Excel here.
This is a product for developers, and I'd suspect
that the majority of them would know what a bug
report should be.
[...] -cd
Schobi
-- Sp******@gmx.de is never read
I'm Schobi at suespammers org
"And why should I know better by now/When I'm old enough not to?"
Beth Orton This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chris F Clark |
last post by:
In our C++ project we have some internal bug reporting macros that we
use to get useful information when the program does something
unexpected. Essentially at the point of the error, we invoke an
internal interactive debugger that knows the classes
within our system and allow us to walk around the objects that exist
at the time of the fault. It mostly works fairly well. That catch
being that we have to hand implement some of the code...
|
by: mathieu |
last post by:
Hello there,
I am playing around with template metaprograming: I am trying to
redefines my own types. But I am facing a small issue, where I cannot
describe the whole implementation in one single class. Instead I have
to separate implementation for binary and ascii in two different
classes as I don't know how to use the traits technique for
constructors.
Any pointers very welcome !
|
by: Christof Warlich |
last post by:
Hi,
consider this:
template<typename Tclass X {
public:
void doSomething(T t);
};
int main(void) {
X<intx;
|
by: woessner |
last post by:
Hi all,
I whipped up a quick class to represent a matrix for use with LAPACK.
It's a template class so it can support the 4 data types supported by
LAPACK (single/double x complex/real). I added a conversion operator
to automatically convert the object to a pointer of the appropriate
type. This makes using LAPACK in C++ a lot easier.
Unfortunately, it does not work well for the complex data types. The
reason is that LAPACK (or,...
|
by: David O |
last post by:
I am using the CRTP (Curiously Recurring Template Pattern) to provide a
set of low-level functions customizable by environment. Using CRTP
ensures that all the function have the same signatures, which becomes
important as the interfaces grow, especially where hardware interfaces
are involved.
For example:
// Feature set for the environment...
template< class Implementation >
| |
by: anto.anish |
last post by:
Hi ,
Since, i did not want to write all instantiations in Source file of
all template methods for various different datatypes that my client
might use, Instead, i choose to write implementation of template
methods along with their declarations in the header file. Well, there
are also other files in the project, which include this header file as
well, which all gets compiled, linked and tested well.
#ifndef __ATT_H__
|
by: anto.anish |
last post by:
Hi ,
Since, i did not want to write instantiations in Source file of all
template methods for various different datatypes that my client might
use, i choose to write implementation of template methods along with
their declarations in the header file. Well, there are also other
files in the project, which include this header file as well, which
all gets compiled, linked and tested well.
#ifndef __ATT_H__
|
by: anto.anish |
last post by:
Hi ,
Since, i did not want to write explicit instantiations in Source file
of all template methods for various different datatypes that my client
might use, i choose to write implementation of template methods along
with their declarations in the header file. Well, there are also other
files in the project, which include this header file as well, which
all gets compiled, linked and tested well.
#ifndef __ATT_H__
|
by: (2b|!2b)==? |
last post by:
I would like to know if I can specialize only a specific method for a
class template.
Is the (specialization) code below valid?
template <typename T1, typename T2>
class MyClass
{
public:
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |