473,396 Members | 2,092 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.

Better template error reporting

Hi Guys,
Is their is a way to improve the template error message.

I am building a library which is heavly dependent on templates. The problem
is if something wrong in the usage of that library c++ compiler genrates
very long and cryptic error message. Which is hard to debug.

Is there is any way by which I can make these error bit simpler.

Abhishek
Jul 23 '05 #1
10 1370
Abhishek Saksena wrote:
Hi Guys,
Is their is a way to improve the template error message.

I am building a library which is heavly dependent on templates. The problem
is if something wrong in the usage of that library c++ compiler genrates
very long and cryptic error message. Which is hard to debug.

Is there is any way by which I can make these error bit simpler.

Abhishek


Boost provides a "Concept Check" library that I believe is designed in
part to help with that.

http://www.boost.org/libs/concept_ch...cept_check.htm

-Alan
Jul 23 '05 #2
Abhishek Saksena wrote:
Hi Guys,
Is their is a way to improve the template error message.

I am building a library which is heavly dependent on templates. The problem
is if something wrong in the usage of that library c++ compiler genrates
very long and cryptic error message. Which is hard to debug.

Is there is any way by which I can make these error bit simpler.


Yes, avoid templates. Seriously. Nowadays templates are often used
because the deveploper thinks they are 'cool' and not because they are
really necessary.

Jul 23 '05 #3
Rapscallion wrote:
Abhishek Saksena wrote:
Hi Guys,
Is their is a way to improve the template error message.

I am building a library which is heavly dependent on templates. The
problem is if something wrong in the usage of that library c++
compiler genrates very long and cryptic error message. Which is hard
to debug.

Is there is any way by which I can make these error bit simpler.
Yes, avoid templates.


Duh #1. Correction: avoid templates if you don't need them.
Seriously. Nowadays templates are often used
because the deveploper thinks they are 'cool' and not because they are
really necessary.


Duh #2. And they're often used because they're really useful.

--
Lionel B

Jul 23 '05 #4
The fact is that templates are cool because they are a powerful feature
of C++. I've found that most people who say "avoid templates" say this
because they are inexperienced and don't understand how to use them.

Jul 23 '05 #5
BigBrian wrote:
I've found that most people who say "avoid templates" say this
because they are inexperienced and don't understand how to use them.


.... either, or because they have used them extensively and thereupon
avoid them.

Jul 23 '05 #6
Joe

Try: http://www.bdsoft.com/tools/stlfilt.html

On Mon, 06 Jun 2005 11:21:27 +0200, Abhishek Saksena wrote:
Hi Guys,
Is their is a way to improve the template error message.

I am building a library which is heavly dependent on templates. The problem
is if something wrong in the usage of that library c++ compiler genrates
very long and cryptic error message. Which is hard to debug.

Is there is any way by which I can make these error bit simpler.

Abhishek


Jul 23 '05 #7
In message <11**********************@o13g2000cwo.googlegroups .com>,
Rapscallion <ra********@spambob.com> writes
BigBrian wrote:
I've found that most people who say "avoid templates" say this
because they are inexperienced and don't understand how to use them.


... either, or because they have used them extensively and thereupon
avoid them.

Or because they're just trolling.

Followups set.

--
Richard Herring
Jul 23 '05 #8
Richard Herring wrote:
In message <11**********************@o13g2000cwo.googlegroups .com>,
Rapscallion <ra********@spambob.com> writes
BigBrian wrote:
I've found that most people who say "avoid templates" say this
because they are inexperienced and don't understand how to use them.


... either, or because they have used them extensively and thereupon
avoid them.

Or because they're just trolling.


I bet you believe Boost is "cool".

Jul 23 '05 #9
>I bet you believe Boost is "cool".

Yes, and so do most experienced C++ programmers.

Jul 23 '05 #10
In message <11*********************@g49g2000cwa.googlegroups. com>,
Rapscallion <ra********@spambob.com> writes
Richard Herring wrote:
In message <11**********************@o13g2000cwo.googlegroups .com>,
Rapscallion <ra********@spambob.com> writes
>BigBrian wrote:
>> I've found that most people who say "avoid templates" say this
>> because they are inexperienced and don't understand how to use them.
>
>... either, or because they have used them extensively and thereupon
>avoid them.
>

Or because they're just trolling.


I bet you believe Boost is "cool".

Belief is for theology, not programming. I know it provides some
extremely useful features, well documented, thoroughly tested on a
variety of platforms, together with reasoned arguments for why things
are done one way and not another.

Feel free to provide reasoned on-topic arguments to support your own
beliefs, and what you'd offer as an alternative to Boost.

--
Richard Herring
Jul 23 '05 #11

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

Similar topics

2
by: Simon G Best | last post by:
Hello! I have a query regarding explicit specialisation of class templates which are themselves members of class templates. Here's what I want to do: template< class T > struct pink { ...
6
by: Adam Parkin | last post by:
Hello, all I'm having a problem with friend functions in a templatized Queue class I'm writing using linked lists. The problem is that I can't get the friend function to be able to access private...
0
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...
3
by: Sven Groot | last post by:
This was posted by someone in comp.lang.c++, and later in microsoft.public.vstudio.general, but since I know Carl is in this group, and he's the one that should read this, I've reposted it here....
2
by: Rudy Ray Moore | last post by:
Whenever I get any error with Vc++7.1/.net/2003, it is followed by huge ammounts of "template assistance" error messaging referencing template code (MTL) that has nothing to do with the error. ...
2
by: steve | last post by:
Hi, I'm trying to use a protocol class as a template parameter. The protocol class defines its own types and methods for working with them. The template class uses the types defined by the...
0
by: Joshua V. | last post by:
We are trying to implement Windows Error Reporting from within our VB.Net application. Basically we want to replace the standard unhandled exception message we use with the Windows Error Reporting...
0
by: fperri | last post by:
Hi, I am trying to configure reporting services which I just added to an already existing installation of SQL Server 2005. When I am in the reporting services configuration manager and I am trying...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
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
tracyyun
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...
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.