1// Copyright (c) 2023 Bela Schaum, X-Ryl669, Denis Mikhailov.
2//
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6
7// Initial implementation by Bela Schaum, https://github.com/schaumb
8// The way to make it union and UB free by X-Ryl669, https://github.com/X-Ryl669
9//
10
11template <int* p>
12class X {};
13
14struct S
15{
16 int m;
17} s;
18
19X<&s.m> x4;
20
21int main() {}
22
23
24

source code of boost/libs/pfr/test/core_name/cxx20_address_of_non_static_member_tplarg_detection.cpp