I need to be able to have any object that takes a single bool as a template parameter, and obtain the type of that object without the bool, so I can then create a similarly typed object but of a different bool.
This is what I came up with, but it does not compile. How can I achieve this aim please?
template<template<bool> typename ClassName, bool TheBool>
struct FT
{
using TYPE = ClassName;
};
template<bool X>
struct T {};
int main() {
T<true> t;
// Somehow get the type T (without the true) so I can then create a T<false> if I want...
using RawType = FT<decltype(t)>::TYPE;
RawType<false> f;
}
(I have searched beforehand but came up blanks, hence this question.)