mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
Update the array tests to not use a local type; removes warnings in C++03. NFC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344417 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,6 +19,11 @@
|
|||||||
// Disable the missing braces warning for this reason.
|
// Disable the missing braces warning for this reason.
|
||||||
#include "disable_missing_braces_warning.h"
|
#include "disable_missing_braces_warning.h"
|
||||||
|
|
||||||
|
struct NoDefault {
|
||||||
|
NoDefault(int) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -55,9 +60,6 @@ int main()
|
|||||||
assert(pint % TEST_ALIGNOF(std::max_align_t) == 0);
|
assert(pint % TEST_ALIGNOF(std::max_align_t) == 0);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
struct NoDefault {
|
|
||||||
NoDefault(int) {}
|
|
||||||
};
|
|
||||||
typedef NoDefault T;
|
typedef NoDefault T;
|
||||||
typedef std::array<T, 0> C;
|
typedef std::array<T, 0> C;
|
||||||
C c = {};
|
C c = {};
|
||||||
|
@@ -20,6 +20,10 @@
|
|||||||
// Disable the missing braces warning for this reason.
|
// Disable the missing braces warning for this reason.
|
||||||
#include "disable_missing_braces_warning.h"
|
#include "disable_missing_braces_warning.h"
|
||||||
|
|
||||||
|
struct NoDefault {
|
||||||
|
NoDefault(int) {}
|
||||||
|
};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -39,9 +43,6 @@ int main()
|
|||||||
(void)p; // to placate scan-build
|
(void)p; // to placate scan-build
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
struct NoDefault {
|
|
||||||
NoDefault(int) {}
|
|
||||||
};
|
|
||||||
typedef NoDefault T;
|
typedef NoDefault T;
|
||||||
typedef std::array<T, 0> C;
|
typedef std::array<T, 0> C;
|
||||||
const C c = {};
|
const C c = {};
|
||||||
|
@@ -18,6 +18,10 @@
|
|||||||
// Disable the missing braces warning for this reason.
|
// Disable the missing braces warning for this reason.
|
||||||
#include "disable_missing_braces_warning.h"
|
#include "disable_missing_braces_warning.h"
|
||||||
|
|
||||||
|
struct NoDefault {
|
||||||
|
NoDefault(int) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@@ -33,9 +37,6 @@ int main()
|
|||||||
assert(c[0] == 5.5);
|
assert(c[0] == 5.5);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
struct NoDefault {
|
|
||||||
NoDefault(int) {}
|
|
||||||
};
|
|
||||||
typedef NoDefault T;
|
typedef NoDefault T;
|
||||||
typedef std::array<T, 0> C;
|
typedef std::array<T, 0> C;
|
||||||
C c = {};
|
C c = {};
|
||||||
|
Reference in New Issue
Block a user