I'm trying to output the full type of a typedef in the build log of Visual Studio; even for possibly failing typedefs, fe when a partial specialisation is missing. My specific version is 2019 but i also tried and failed with 2010 and 2015.
The only possible solution for this i could find is here but it doesn't work in Visual Studio.
Here's the testcode:
template<typename T>
struct Printer;
template <typename T>
struct ST;
template <>
struct ST<int&> {
typedef int T;
};
template <typename T>
struct S {
Printer<typename ST<T>::T> t;
};
int main() {
typedef int& intref;
S<intref> testi;
typedef float& floatref;
S<floatref> testf;
typedef short& shortref;
Printer<shortref> testsi;
}
For this example, i'd like to see somewhere an output of
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.