blob: 756f55352ed8ee1931de8a25dc0cca4c3d4a5929 [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++98, 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;
}