KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Hallo, is there some easy way in C++ to tell (in compile-time) if a class/struct has no data members? E.g. struct T{}; My first thought was to compare sizeof(T)==0 , but this always seems to be at least 1. The obvious answer would be to just look at the code, but I would like to switch on this.
Tags (comma-separated)
Save Edits
Cancel