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>
+
* testsuite/20_util/is_trivial/value.cc: New.
* testsuite/20_util/is_standard_layout/value.cc: Likewise.
* testsuite/20_util/is_pod/value.cc: Extend.
#include <testsuite_hooks.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()
{
bool test __attribute__((unused)) = true;
#include <testsuite_hooks.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()
{
bool test __attribute__((unused)) = true;
#include <testsuite_hooks.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()
{
bool test __attribute__((unused)) = true;
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; }
long truncate_double(double x) { return (long)x; }