On Tue, 8 Nov 2011, Marc Glisse wrote:
On Tue, 8 Nov 2011, Ulrich Drepper wrote:
Complicated title, here's a bit of code:
#ifdef FIX
# define PARM2 , class T5
#else
# define PARMS2
#endif
template
struct cl1 {
};
template class T4 = cl1>
struct cl2 {
};
cl2<> var;
If co
On Tue, Nov 8, 2011 at 10:53 AM, Marc Glisse wrote:
> On Tue, 8 Nov 2011, Ulrich Drepper wrote:
>
>> Complicated title, here's a bit of code:
>>
>> #ifdef FIX
>> # define PARM2 , class T5
>> #else
>> # define PARMS2
>> #endif
>>
>>
On Tue, 8 Nov 2011, Ulrich Drepper wrote:
Complicated title, here's a bit of code:
#ifdef FIX
# define PARM2 , class T5
#else
# define PARMS2
#endif
template
struct cl1 {
};
template class T4 = cl1>
struct cl2 {
};
cl2<> var;
If compiled without FIX defined this will fail wi
Complicated title, here's a bit of code:
#ifdef FIX
# define PARM2 , class T5
#else
# define PARMS2
#endif
template
struct cl1 {
};
template class T4 = cl1>
struct cl2 {
};
cl2<> var;
If compiled without FIX defined this will fail with gcc 4.3 and later.
Haven't check
quot;<< ix<< " ] ia: "<< ia[ix]
> > > << "\tca: "<< ca[ix]
> > > << "\tda: "<< da[ix]<< std::endl;
> > >
> > > return 0;
> > > }
> > > ---
>
eric writes:
> Thanks your suggestion, I follow it but it show fatal error:Array.cpp:
> no such file
> so
> I add #include "Array.cpp" in my main program, pg52.cpp
> then
> it can compile
> but
> when I run it, it response
> Segmentation fault
>
> again it's g++ 4.5.2. What may cause wrong?
>
<< "\tda: "<< da[ix]<< std::endl;
> >
> > return 0;
> > }
> > -------
> > // Array.cpp
> >
> > #include "Array.h"
> >
> > /*
> > Array::Array(elemType *iarray, int iarray_size)
> > {
> >
"Zhang Lin" writes:
> class ACE_Message_Queue_NT;
> template
> ACE_Message_Queue_NT *ACE_Message_Queue_Factory::create_NT_message_queue
> (int max_threads)
> {
> ACE_Message_Queue_NT *tmp = 0;
>
> tmp = new ACE_Message_Queue_NT (max_threads);
>
> return tmp;
> }
>
> class ACE_Message_Queue_
Hello,
I have encountered an issue when building ACE with MinGW and GCC 4.4.1.
The following example can reproduce the issue:
==
main.cpp
==
class ACE_Message_Queue_NT;
template
class ACE_Message_Queue_Factory
{
public:
static ACE_Message_Queue_NT *create_NT_message_queue (int
Simon Hill wrote:
> g++ doesn't seem able to match a template ctor of a template class
> where the ctor input is an internal class defined inside any template
> class.
>
> I briefly skimmed the titles of the current regression issues and I
> didn't notice any that m
On Wed, Mar 4, 2009 at 9:12 PM, Simon Hill wrote:
> g++ doesn't seem able to match a template ctor of a template class
> where the ctor input is an internal class defined inside any template
> class.
>
> I briefly skimmed the titles of the current regression issues and I
>
g++ doesn't seem able to match a template ctor of a template class
where the ctor input is an internal class defined inside any template
class.
I briefly skimmed the titles of the current regression issues and I
didn't notice any that matched this, but I'm not 100% sure.
I first p
Simon Hill wrote:
Sorry Paolo, that definitely should have been.
no problem.
Is this a bug?
I think so. I opened c++/37234, you may want to add yourself to the CC
list of the PR.
Paolo.
Sorry Paolo, that definitely should have been.
=== THIS CODE FAILS TO LINK ===
template
class foo {
public:
foo() =default; // <<--- this works fine.
~foo();
};
template
foo::~foo() =default; <<--- ERROR: This doesn't get built by the compiler.
// foo::~foo() {}; &l
Hi,
=== THIS CODE FAILS TO COMPILE ===
template
class foo {
public:
foo() =default; // <<--- this works fine.
~foo();
};
template
foo::~foo() =default; <<--- ERROR: This doesn't get built by the compiler.
// foo::~foo() {}; <<-- replacing with this line fix
.. and I would suggest filing a normal Bugzilla PR, to the attention of
[EMAIL PROTECTED] in CC, because it seems indeed a bug to me: we even
have in the testsuite a very similar run-type test different only
because the class isn't a template.
Paolo.
.. never mind, the problem you are seeing is at *link* time, ok...
Paolo.
;m not 100% sure it is a bug.
=== THIS CODE FAILS TO COMPILE ===
template
class foo {
public:
foo() =default; // <<--- this works fine.
~foo();
};
template
foo::~foo() =default; <<--- ERROR: This doesn't get built by the compiler.
// foo::~foo() {}; <<--
; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thanks,
Peng
template
class A {
public:
A(int a) {
T temp = a + 1;
_a = temp + 1;
}
private:
T _a;
};
int main() {
A a(1);
}
$ gdb main
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation
constructor 'Three::Three()':
> test.cpp:20: error: 'm_Public' was not declared in this scope
>
> class One
> {
> public:
> One();
> ~One();
>
> public:
> int m_Public;
> };
>
> template class Two : public One
> {
> pub
public:
int m_Public;
};
template class Two : public One
{
public:
Two() {m_Public = 0;}
};
template class Three : public Two
{
public:
Three() {m_Public = 0;}
};
this fixes it.
template class Three : public Two
{
public:
Three() {Two::m_Public = 0;}
};
main(int argc, char **argv)
> {
> std::cout << TestInt::member << std::endl;
> return 0;
> }
>
> / test.h
> template
> class Test
> {
> public:
>
> static T member;
> };
add this line here:
template T Test::member;
>
ber << std::endl;
return 0;
}
/ test.h
template
class Test
{
public:
static T member;
};
typedef Test TestInt;
/ test.cpp
#include "Test.h"
template class Test;
template<> int Test::member;
I got an error at link because it cannot find the symb
23 matches
Mail list logo