CMiniLexicon::FindMajorSignatures(): use log file routines
[linguistica.git] / implicit_cast.h
blobd651e218f44d51621508b04a93e200365978864e
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"
12 ///
13 /// Usage:
14 /// CPrefix* prefix;
15 /// CSuffix* suffix;
16 /// /* ... */
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