mirror of
https://github.com/boostorg/uuid.git
synced 2025-05-12 05:51:43 +00:00
32 lines
531 B
C++
32 lines
531 B
C++
// Copyright 2024 Peter Dimov
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
|
|
#define BOOST_UUID_DISABLE_ALIGNMENT
|
|
|
|
#include <boost/uuid/uuid.hpp>
|
|
#include <boost/core/lightweight_test.hpp>
|
|
#include <cstddef>
|
|
|
|
using namespace boost::uuids;
|
|
|
|
struct X1
|
|
{
|
|
unsigned char a;
|
|
uuid b;
|
|
};
|
|
|
|
struct X2
|
|
{
|
|
unsigned char a[2];
|
|
uuid b;
|
|
};
|
|
|
|
int main()
|
|
{
|
|
BOOST_TEST_EQ( offsetof(X1, b), 1 );
|
|
BOOST_TEST_EQ( offsetof(X2, b), 2 );
|
|
|
|
return boost::report_errors();
|
|
}
|