Re: Polyspace Problem
- From: "hyderabadblues" <sirishkumar@xxxxxxxxx>
- Date: 28 Feb 2007 02:17:32 -0800
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.
But the same code does not give any error in VC++ compiler
.
- Follow-Ups:
- Re: Polyspace Problem
- From: mark_bluemel
- Re: Polyspace Problem
- From: Richard Tobin
- Re: Polyspace Problem
- From: Chris Dollin
- Re: Polyspace Problem
- References:
- Polyspace Problem
- From: hyderabadblues
- Re: Polyspace Problem
- From: mark_bluemel
- Polyspace Problem
- Prev by Date: Re: Polyspace Problem
- Next by Date: Re: Polyspace Problem
- Previous by thread: Re: Polyspace Problem
- Next by thread: Re: Polyspace Problem
- Index(es):
Relevant Pages
|