testsuite_tr1.h (NType, [...]): Add.
2010-03-23 Paolo Carlini <paolo.carlini@oracle.com> * testsuite/util/testsuite_tr1.h (NType, TType, SLType, PODType): Add. * testsuite/20_util/is_trivial/value.cc: Adjust. * testsuite/20_util/is_standard_layout/value.cc: Likewise. * testsuite/20_util/is_pod/value.cc: Likewise. From-SVN: r157673
This commit is contained in:
parent
e0e3300cb1
commit
54add74038
|
@ -1,3 +1,10 @@
|
||||||
|
2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
* testsuite/util/testsuite_tr1.h (NType, TType, SLType, PODType): Add.
|
||||||
|
* testsuite/20_util/is_trivial/value.cc: Adjust.
|
||||||
|
* testsuite/20_util/is_standard_layout/value.cc: Likewise.
|
||||||
|
* testsuite/20_util/is_pod/value.cc: Likewise.
|
||||||
|
|
||||||
2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
|
2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* testsuite/20_util/is_trivial/value.cc: New.
|
* testsuite/20_util/is_trivial/value.cc: New.
|
||||||
|
|
|
@ -22,34 +22,6 @@
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
#include <testsuite_tr1.h>
|
#include <testsuite_tr1.h>
|
||||||
|
|
||||||
struct NType // neither trivial nor standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
virtual ~NType();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TType // trivial but not standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
private:
|
|
||||||
int j;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SLType // standard-layout but not trivial
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
~SLType();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PODType // both trivial and standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
};
|
|
||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
bool test __attribute__((unused)) = true;
|
bool test __attribute__((unused)) = true;
|
||||||
|
|
|
@ -22,34 +22,6 @@
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
#include <testsuite_tr1.h>
|
#include <testsuite_tr1.h>
|
||||||
|
|
||||||
struct NType // neither trivial nor standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
virtual ~NType();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TType // trivial but not standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
private:
|
|
||||||
int j;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SLType // standard-layout but not trivial
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
~SLType();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PODType // both trivial and standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
};
|
|
||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
bool test __attribute__((unused)) = true;
|
bool test __attribute__((unused)) = true;
|
||||||
|
|
|
@ -22,34 +22,6 @@
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
#include <testsuite_tr1.h>
|
#include <testsuite_tr1.h>
|
||||||
|
|
||||||
struct NType // neither trivial nor standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
virtual ~NType();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TType // trivial but not standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
private:
|
|
||||||
int j;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SLType // standard-layout but not trivial
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
~SLType();
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PODType // both trivial and standard-layout
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int j;
|
|
||||||
};
|
|
||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
bool test __attribute__((unused)) = true;
|
bool test __attribute__((unused)) = true;
|
||||||
|
|
|
@ -129,6 +129,33 @@ namespace __gnu_test
|
||||||
explicit ExplicitClass(int&);
|
explicit ExplicitClass(int&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct NType // neither trivial nor standard-layout
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int j;
|
||||||
|
virtual ~NType();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TType // trivial but not standard-layout
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
private:
|
||||||
|
int j;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SLType // standard-layout but not trivial
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int j;
|
||||||
|
~SLType();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PODType // both trivial and standard-layout
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int j;
|
||||||
|
};
|
||||||
|
|
||||||
int truncate_float(float x) { return (int)x; }
|
int truncate_float(float x) { return (int)x; }
|
||||||
long truncate_double(double x) { return (long)x; }
|
long truncate_double(double x) { return (long)x; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue