no message
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@136 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
3cf210ef61
commit
15f21dd90a
1 changed files with 16 additions and 11 deletions
|
@ -29,10 +29,15 @@ If you use Singletons with longevity you must add Singleton.cpp to your project/
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
------
|
------
|
||||||
|
Mar 18, 2004:
|
||||||
|
-------------
|
||||||
|
* In SmartPtr.h: Added operator=-workaround for pointer-assignment
|
||||||
|
* In Functor.h: Changed value parameter to referemce parameter
|
||||||
|
in FunctorBase and FunctorVoidBase Ctors.
|
||||||
Mar 21, 2003:
|
Mar 21, 2003:
|
||||||
-------------
|
-------------
|
||||||
* In MultiMethods.h: Added a new explicit template argument specification (ETAS)-workaround
|
* In MultiMethods.h: Added a new explicit template argument specification (ETAS)-workaround
|
||||||
for FnDispatcher::Add which is more compliant with other
|
for FnDispatcher::Add which is more compliant with other
|
||||||
ETAS-workarounds used in this port.
|
ETAS-workarounds used in this port.
|
||||||
|
|
||||||
Mar 20, 2003:
|
Mar 20, 2003:
|
||||||
|
@ -275,7 +280,7 @@ Unfortunately the MSVC 6.0 supports neither of them.
|
||||||
[/code]
|
[/code]
|
||||||
|
|
||||||
If you know of a better workaround, please let me know.
|
If you know of a better workaround, please let me know.
|
||||||
|
|
||||||
Update:
|
Update:
|
||||||
-------
|
-------
|
||||||
The problem in the example above is Add's nontype-function-pointer-Parameter.
|
The problem in the example above is Add's nontype-function-pointer-Parameter.
|
||||||
|
@ -288,11 +293,11 @@ Unfortunately the MSVC 6.0 supports neither of them.
|
||||||
public:
|
public:
|
||||||
// Etas stands for explicit template argument specification.
|
// Etas stands for explicit template argument specification.
|
||||||
// Do whatever you need to do with callback in this class.
|
// Do whatever you need to do with callback in this class.
|
||||||
template <class SomeLhs, class SomeRhs,
|
template <class SomeLhs, class SomeRhs,
|
||||||
ResultType (*callback)(SomeLhs&, SomeRhs&), bool symmetric = false>
|
ResultType (*callback)(SomeLhs&, SomeRhs&), bool symmetric = false>
|
||||||
struct Etas
|
struct Etas
|
||||||
{/*...*/};
|
{/*...*/};
|
||||||
|
|
||||||
// EtasType has to be a template parameter. If one tries to use
|
// EtasType has to be a template parameter. If one tries to use
|
||||||
// a parameter of type Etas the MSVC 6.0 won't generate correct
|
// a parameter of type Etas the MSVC 6.0 won't generate correct
|
||||||
// code.
|
// code.
|
||||||
|
@ -369,7 +374,7 @@ Unfortunately the MSVC 6.0 supports neither of them.
|
||||||
struct Foo : public Select<IsVoid<R>::value, FooVoidBase, FooBase<R> >::Result
|
struct Foo : public Select<IsVoid<R>::value, FooVoidBase, FooBase<R> >::Result
|
||||||
{};
|
{};
|
||||||
[/code]
|
[/code]
|
||||||
|
|
||||||
The MSVC 6 allows explicit template specialization in class scope.
|
The MSVC 6 allows explicit template specialization in class scope.
|
||||||
In contrast the C++ Standards only allows explicit template specialization
|
In contrast the C++ Standards only allows explicit template specialization
|
||||||
in namespace scope. Using the non-compliant feature, the implementation
|
in namespace scope. Using the non-compliant feature, the implementation
|
||||||
|
@ -379,15 +384,15 @@ Unfortunately the MSVC 6.0 supports neither of them.
|
||||||
{
|
{
|
||||||
struct FooBase
|
struct FooBase
|
||||||
{
|
{
|
||||||
template <class R>
|
template <class R>
|
||||||
struct In
|
struct In
|
||||||
{
|
{
|
||||||
R Func() {return R();}
|
R Func() {return R();}
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct In<void>
|
struct In<void>
|
||||||
{;
|
{;
|
||||||
void Func() {}
|
void Func() {}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -395,7 +400,7 @@ Unfortunately the MSVC 6.0 supports neither of them.
|
||||||
struct Foo : Private::FooBase::In<R>
|
struct Foo : Private::FooBase::In<R>
|
||||||
{};
|
{};
|
||||||
[/code]
|
[/code]
|
||||||
|
|
||||||
Please note that *all* new base classes are only meant as a hidden
|
Please note that *all* new base classes are only meant as a hidden
|
||||||
implementation detail.
|
implementation detail.
|
||||||
You should never use any of them directly or indirectly. In particular don't
|
You should never use any of them directly or indirectly. In particular don't
|
||||||
|
@ -686,7 +691,7 @@ Interface changes:
|
||||||
Dispatcher dis;
|
Dispatcher dis;
|
||||||
disp.Add<Rectangle, Poly, &Hatch>();
|
disp.Add<Rectangle, Poly, &Hatch>();
|
||||||
[/code]
|
[/code]
|
||||||
|
|
||||||
Using this port the last line either becomes:
|
Using this port the last line either becomes:
|
||||||
[code]
|
[code]
|
||||||
disp.Add(Dispatcher::Etas<Rectangle, Poly, &Hatch>());
|
disp.Add(Dispatcher::Etas<Rectangle, Poly, &Hatch>());
|
||||||
|
|
Loading…
Reference in a new issue