Resend: Prefast problem with partial specialization of a template class - Software-Testing
This is a discussion on Resend: Prefast problem with partial specialization of a template class - Software-Testing ; Any light on this problem would be much appreciated!
-------------------
I have a fairly large project that uses C++ partial templates. This
works fine to build with CE5. However, it seems like prefast doesn't
handle this correctly.
The snippet below ...
-
Resend: Prefast problem with partial specialization of a template class
Any light on this problem would be much appreciated!
-------------------
I have a fairly large project that uses C++ partial templates. This
works fine to build with CE5. However, it seems like prefast doesn't
handle this correctly.
The snippet below reproduces the problem I see in my larger project.
Building this code below with prefast gives:
* error C2065: 'T' : undeclared identifier
* error C2687: cannot define a nested UDT of a template class out of line
* fatal error C1903: unable to recover from previous error(s); stopping
compilation
(It works fine building the code with "build -c", but "prefast build -c"
gives this error)
Is it possible to report a bug for this? Maybe there's a fix available
already?
Regards
C.
-------------------------------
template<typename T, bool b>
class Foo
{
protected:
Foo()
{
}
};
template<typename T>
class Foo<T, false>
{
public:
Foo()
{
}
};
-
Re: Resend: Prefast problem with partial specialization of a template class
Sorry I missed this the first time. The version of Prefast shipped with
Platform Builder has some inconsistencies with the latest compilers.
Unfortunately, there is no workaround, but this should be fixed in a future
version.
Sorry again for the inconvenience.
"Charlie Peterson" <charlie@nospam.com> wrote in message
news:ubOzsOcJFHA.616@TK2MSFTNGP10.phx.gbl...
>
>
> Any light on this problem would be much appreciated!
>
>
> -------------------
>
> I have a fairly large project that uses C++ partial templates. This
> works fine to build with CE5. However, it seems like prefast doesn't
> handle this correctly.
>
> The snippet below reproduces the problem I see in my larger project.
> Building this code below with prefast gives:
>
> * error C2065: 'T' : undeclared identifier
> * error C2687: cannot define a nested UDT of a template class out of line
> * fatal error C1903: unable to recover from previous error(s); stopping
> compilation
>
> (It works fine building the code with "build -c", but "prefast build -c"
> gives this error)
>
> Is it possible to report a bug for this? Maybe there's a fix available
> already?
>
> Regards
> C.
>
> -------------------------------
>
> template<typename T, bool b>
> class Foo
> {
> protected:
> Foo()
> {
> }
> };
>
> template<typename T>
> class Foo<T, false>
> {
> public:
> Foo()
> {
> }
> };
>
>
Similar Threads
-
By Application Development in forum C
Replies: 4
Last Post: 11-19-2007, 05:01 PM
-
By Application Development in forum c++
Replies: 3
Last Post: 10-11-2007, 01:01 AM
-
By Application Development in forum c++
Replies: 1
Last Post: 06-28-2007, 09:58 AM
-
By Application Development in forum c++
Replies: 0
Last Post: 03-05-2007, 09:55 AM
-
By Application Development in forum Software-Testing
Replies: 0
Last Post: 03-05-2005, 10:48 AM