1 // Explicit requests for implicit type conversion
2 // Copyright © 2009 The University of Chicago
3 #ifndef IMPLICIT_CAST_H
4 #define IMPLICIT_CAST_H
6 namespace linguistica
{
7 template<class T
, class U
> T
implicit_cast(U x
);
10 /// Helper function: Convert CPrefix* or CSuffix* to CAffix*
11 /// Reference: B. Stroustroup, "The C++ Programming Language"
17 /// CAffix* affix = analyzingSuffixes ?
18 /// implicit_cast<CAffix*>(suffix) :
19 /// implicit_cast<CAffix*>(prefix);
20 template<class T
, class U
> T
linguistica::implicit_cast(U x
) { return x
; }
22 #endif // IMPLICIT_CAST_H