This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
template <class T>
class is_default_constructible {
template <int> struct helper {};
typedef char no; typedef char yes[2];
static no fn(...);
static yes fn( helper<sizeof(new T)>* );
public:
static const bool value = sizeof(fn(0)) == sizeof(yes);
};
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |