blob: 7a573c7184f98ff3e81e4a3d8416b156b8efd4ac [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
#include <cstddef>
#include "test_macros.h"
#ifndef offsetof
#error offsetof not defined
#endif
struct A
{
int x;
};
int main(int, char**)
{
static_assert(noexcept(offsetof(A, x)), "");
return 0;
}