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:
syntheticpp 2005-11-20 13:16:04 +00:00
parent 9ec0d8ee64
commit 75722359cf
2 changed files with 10 additions and 1 deletions

View file

@ -58,7 +58,13 @@ namespace Loki
return *val_; return *val_;
} }
T* operator->()
{
return val_;
}
protected: protected:
OrderedStaticBase(unsigned int longevity) : val_(0), longevity_(longevity) OrderedStaticBase(unsigned int longevity) : val_(0), longevity_(longevity)
{ {
} }

View file

@ -124,7 +124,7 @@ int main()
std::string s("text11"); std::string s("text11");
*s1=s; *s1=s;
std::cout << "value of s1: " << (*s1).c_str() << "\n"; std::cout << "value of s1: " << s1->c_str() << "\n";
#else #else
@ -137,6 +137,9 @@ int main()
#endif #endif
std::cout << "\n"; std::cout << "\n";
system("pause");
return 0; return 0;
} }