This is directly linked/referenced by the question asked here Declaring a new struct on the fly. There are a few solutions presented with a very elegant solution using a lambda, exploiting the fact that every lambda has a unique type. The solution is as follows:
template <size_t>
constexpr auto make_new_type() { return [](){}; }
using A = decltype(make_new_type<__LINE__>());
using B = decltype(make_new_type<__LINE__>());
using C = decltype(make_new_type<__LINE__>());
What problem does the above solve which could be applied "generally"?