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
11#ifndef BOOST_PFR_DETAIL_CORE_NAME14_DISABLED_HPP
12#define BOOST_PFR_DETAIL_CORE_NAME14_DISABLED_HPP
13#pragma once
14
15#include <boost/pfr/detail/config.hpp>
16#include <boost/pfr/detail/sequence_tuple.hpp>
17
18namespace boost { namespace pfr { namespace detail {
19
20template <class T, std::size_t I>
21constexpr auto get_name() noexcept {
22 static_assert(
23 sizeof(T) && false,
24 "====================> Boost.PFR: Field's names extracting functionality requires C++20."
25 );
26
27 return nullptr;
28}
29
30template <class T>
31constexpr auto tie_as_names_tuple() noexcept {
32 static_assert(
33 sizeof(T) && false,
34 "====================> Boost.PFR: Field's names extracting functionality requires C++20."
35 );
36
37 return detail::sequence_tuple::make_sequence_tuple();
38}
39
40}}} // namespace boost::pfr::detail
41
42#endif // BOOST_PFR_DETAIL_CORE_NAME14_DISABLED_HPP
43
44

source code of boost/libs/pfr/include/boost/pfr/detail/core_name14_disabled.hpp