point operator added
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@371 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
9ec0d8ee64
commit
75722359cf
2 changed files with 10 additions and 1 deletions
|
@ -58,7 +58,13 @@ namespace Loki
|
|||
return *val_;
|
||||
}
|
||||
|
||||
T* operator->()
|
||||
{
|
||||
return val_;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
OrderedStaticBase(unsigned int longevity) : val_(0), longevity_(longevity)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ int main()
|
|||
|
||||
std::string s("text11");
|
||||
*s1=s;
|
||||
std::cout << "value of s1: " << (*s1).c_str() << "\n";
|
||||
std::cout << "value of s1: " << s1->c_str() << "\n";
|
||||
|
||||
#else
|
||||
|
||||
|
@ -137,6 +137,9 @@ int main()
|
|||
#endif
|
||||
|
||||
std::cout << "\n";
|
||||
|
||||
system("pause");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue