コード例 #1
0
int main(int argc, char* argv[])
{
    {
        true_value tr;
        tr = check<__is_pod(A1)>::f();
    }

    {
        true_value tr;
        tr = check<__is_pod(A2)>::f();
    }

    {
        false_value tr;
        tr = check<__is_pod(A3)>::f();
    }

    {
        false_value tr;
        tr = check<__is_pod(A4)>::f();
    }

    {
        false_value tr;
        tr = check<__is_pod(A5)>::f();
    }

    {
        false_value tr;
        tr = check<__is_pod(A6)>::f();
    }

    {
        true_value tr;
        tr = check<__is_pod(A7)>::f();
    }

    {
        false_value tr;
        tr = check<__is_pod(A8)>::f();
    }
}
コード例 #2
0
ファイル: is_pod_98.C プロジェクト: 0day-ci/gcc
int main ()
{
  if (!__is_pod (strPOD))
    abort ();
  return 0;
}
コード例 #3
0
bool vde4 = __has_virtual_destructor(void);
bool vde5 = __has_virtual_destructor(const void);

bool tde1 = __has_trivial_destructor(I); // { dg-error "incomplete type" }
bool tde2 = __has_trivial_destructor(C[]);
bool tde3 = __has_trivial_destructor(I[]); // { dg-error "incomplete type" }
bool tde4 = __has_trivial_destructor(void);
bool tde5 = __has_trivial_destructor(const void);

bool abs1 = __is_abstract(I); // { dg-error "incomplete type" }
bool abs2 = __is_abstract(C[]);
bool abs3 = __is_abstract(I[]); // { dg-error "incomplete type" }
bool abs4 = __is_abstract(void);
bool abs5 = __is_abstract(const void);

bool pod1 = __is_pod(I); // { dg-error "incomplete type" }
bool pod2 = __is_pod(C[]);
bool pod3 = __is_pod(I[]); // { dg-error "incomplete type" }
bool pod4 = __is_pod(void);
bool pod5 = __is_pod(const void);

bool emp1 = __is_empty(I); // { dg-error "incomplete type" }
bool emp2 = __is_empty(C[]);
bool emp3 = __is_empty(I[]); // { dg-error "incomplete type" }
bool emp4 = __is_empty(void);
bool emp5 = __is_empty(const void);

bool pol1 = __is_polymorphic(I); // { dg-error "incomplete type" }
bool pol2 = __is_polymorphic(C[]);
bool pol3 = __is_polymorphic(I[]); // { dg-error "incomplete type" }
bool pol4 = __is_polymorphic(void);
コード例 #4
0
void f() {
  __is_pod(S); // expected-error{{incomplete type 'struct S' used in type trait expression}}
}
コード例 #5
0
ファイル: traits.hpp プロジェクト: Luegg/origin
 concept bool
 Pod_type() { return __is_pod(T); }