|
|
От: |
The_Thing
|
http://twitter.com/The_Thing_rus |
| Дата: | 29.09.09 09:32 | ||
| Оценка: | |||
#include <iostream>
using namespace std;
namespace A {
template <typename T>
void foo(T* val)
{
val->b_ = 2;
cout << val->b_;
}
};
class B {
public:
friend void A::foo<>(B*);
private:
int b_;
};
int main()
{
B b;
A::foo(&b);
return 0;
}