Skip to content

Commit

Permalink
Fix CI && Resolve review && improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
denzor200 committed Nov 25, 2023
1 parent 66cb535 commit 1ed697a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions example/quick_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ void test_examples() {
//[pfr_quick_examples_get_name
// Get name of field by index

// Keep in mind that it's unportable code
// You should move this structure somewhere outside of function scope
struct sample {
int f1;
long f2;
Expand Down
2 changes: 1 addition & 1 deletion include/boost/pfr/detail/core_name20_static.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ consteval auto name_of_field() noexcept {
&& std::string_view{
detail::name_of_field_impl<
core_name_skip, detail::make_clang_wrapper(std::addressof(
fake_object<core_name_skip>().size_at_begin
detail::fake_object<core_name_skip>().size_at_begin
))
>().data()
} == "size_at_begin",
Expand Down
1 change: 1 addition & 0 deletions include/boost/pfr/detail/fake_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#pragma once

#include <boost/pfr/detail/config.hpp>

namespace boost { namespace pfr { namespace detail {

// This variable serves as a compile-time assert. If you see any error here, then
Expand Down
2 changes: 1 addition & 1 deletion test/core_name/print_name.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using namespace boost::pfr;
template <class T, std::size_t I>
inline constexpr auto no_check_stored_name_of_field = detail::name_of_field_impl<T,
detail::make_clang_wrapper(std::addressof(detail::sequence_tuple::get<I>(
detail::tie_as_tuple(detail::fake_object<T>)
detail::tie_as_tuple(detail::fake_object<T>())
)))
>();

Expand Down

0 comments on commit 1ed697a

Please sign in to comment.