reactos/lib/3rdparty/stlport/test/unit/fib.h
Amine Khaldi 4efda499f7 [CMAKE]
Jerome Gardou:
- Add STLport 5.2.1 (yes, STLport, the c++ stl implementation) to build. For now, it works only in user mode.
- Link some c++ executables to it
- sol.exe : one step towards a complete and modern OS.
- Dedicated to Amine for his patience and his help.
- Might Break Things! (tm)

svn path=/branches/cmake-bringup/; revision=49046
2010-10-07 22:09:31 +00:00

22 lines
269 B
C++

#ifndef _fib_h
#define _fib_h
class Fibonacci
{
public:
Fibonacci() : v1(0), v2(1) {}
inline int operator()();
private:
int v1;
int v2;
};
inline int
Fibonacci::operator()()
{
int r = v1 + v2;
v1 = v2;
v2 = r;
return v1;
}
#endif // _fib_h