URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// { dg-do compile }
|
// { dg-do compile }
|
|
|
namespace boost_no_member_template_friends{
|
namespace boost_no_member_template_friends{
|
|
|
template
|
template
|
class foobar;
|
class foobar;
|
|
|
template
|
template
|
class foo
|
class foo
|
{
|
{
|
private:
|
private:
|
template friend class foobar;
|
template friend class foobar;
|
template friend class foo;
|
template friend class foo;
|
template friend bool must_be_friend_proc(const foo& f);
|
template friend bool must_be_friend_proc(const foo& f);
|
int i;
|
int i;
|
public:
|
public:
|
foo(){ i = 0; }
|
foo(){ i = 0; }
|
template
|
template
|
foo(const foo& f){ i = f.i; }
|
foo(const foo& f){ i = f.i; }
|
};
|
};
|
|
|
template
|
template
|
class foo;
|
class foo;
|
|
|
template
|
template
|
bool must_be_friend_proc(const foo& f);
|
bool must_be_friend_proc(const foo& f);
|
|
|
template
|
template
|
bool must_be_friend_proc(const foo& f)
|
bool must_be_friend_proc(const foo& f)
|
{ return f.i != 0; }
|
{ return f.i != 0; }
|
|
|
template
|
template
|
class foobar
|
class foobar
|
{
|
{
|
int i;
|
int i;
|
public:
|
public:
|
template
|
template
|
foobar(const foo& f)
|
foobar(const foo& f)
|
{ i = f.i; }
|
{ i = f.i; }
|
};
|
};
|
|
|
|
|
int test()
|
int test()
|
{
|
{
|
foo fi;
|
foo fi;
|
foo fd(fi);
|
foo fd(fi);
|
(void) &fd; // avoid "unused variable" warning
|
(void) &fd; // avoid "unused variable" warning
|
foobar fb(fi);
|
foobar fb(fi);
|
(void) &fb; // avoid "unused variable" warning
|
(void) &fb; // avoid "unused variable" warning
|
return 0;
|
return 0;
|
}
|
}
|
|
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.