Re: Polyspace Problem
- From: mark_bluemel@xxxxxxxxx
- Date: 28 Feb 2007 08:23:56 -0800
On 28 Feb, 10:17, "hyderabadblues" <sirishku...@xxxxxxxxx> wrote:
On Feb 28, 10:58 am, mark_blue...@xxxxxxxxx wrote:
On Feb 28, 9:44 am, "hyderabadblues" <sirishku...@xxxxxxxxx> wrote:
Hi,
I am using polyspace tool.
That's irrelevant, I think, and making that part of your subject makes
it less likely that people will respond. Your problem is simply a C
language issue.
When I compile the following code I am getting the error as
__true_type undefined
This is because you haven't defined a type called "__true_type".
struct __true_type{
};
Here you've defined a structure type called "__true_type". (BTW, I
have a feeling that using "__" as the start of an identifier is
against the standard. That namespace is, I think, reserved for
implementors).
struct __type_traits{
typedef __true_type _h;
Here you're trying to define that "_h" (again a leading "_" is not
recommended, I seem to recall) is a way of referring to the data type
"__true_type" which you haven't defined.
};
Can anybody help me regarding this
I'm not totally sure what you are trying to achieve here, so it's not
easy.
I suspect you need to reread your reference books to understand what
typedef does and what it's for.
One approach to what I think you are trying to do would be :-
typedef struct __true_type true_type_t;
struct __true_type{
};
struct __type_traits{
true_type_t _h;
};
Actually the code is a extract of STL that is designed by us.I have
modified it to make it easy.
In other words, you're not showing us the code that's really relevant?
But the same code does not give any error in VC++ compiler
What language do you _think_ you are coding in? C? C++? Some peculiar
hybrid/mongrel supported by a particular compiler?
I know too little of C++ to comment on that, but any conforming C
compiler should, as far as I can tell, reject your code.
.
- References:
- Polyspace Problem
- From: hyderabadblues
- Re: Polyspace Problem
- From: mark_bluemel
- Re: Polyspace Problem
- From: hyderabadblues
- Polyspace Problem
- Prev by Date: Re: Polyspace Problem
- Next by Date: Re: significance of graphics in c
- Previous by thread: Re: Polyspace Problem
- Next by thread: Re: Polyspace Problem
- Index(es):
Relevant Pages
|