SFINAE allows us to detect if a type has certain data members or member functions. Can it also be used to detect if a type exists at all? Background: I want to know whether <vector> was included or not.
SFINAE allows us to detect if a type has certain data members or member
Share
It can do, although I’ve only managed to make it work in C++0x.
The structure is very curious and although there should be certain obvious simplifications, they don’t work. More importantly, why don’t you just
#include <vector>to be certain?