2
0
mirror of https://github.com/boostorg/pfr.git synced 2026-01-19 04:22:13 +00:00

Fix lint issue about nonascii symbol

This commit is contained in:
denzor200
2023-08-12 17:47:58 +00:00
parent fe5a70bac9
commit 196aeb6da0
2 changed files with 13 additions and 4 deletions

View File

@@ -33,7 +33,6 @@ explicit compiler_supports_cxx20_nontype_template_args ;
########## END of helpers to detect C++20 non-type template args support
local REQUIRE_CXX20_NONTYPE_TEMPLATE_ARGS =
[ check-target-builds ../core_name//compiler_supports_cxx20_nontype_template_args : : <build>no ]
;
@@ -46,6 +45,16 @@ project
;
########## BEGIN of helpers to prepare the test with non-ascii field name
actions insert_utf8_action
{
sed 's/%ARG%/\xcf\x80/' $(>) > $(<)
}
make fields_names_nonascii.cpp : fields_names_nonascii.cpp.tpl : @insert_utf8_action ;
########## END of helpers to prepare the test with non-ascii field name
test-suite pfr_tests
:

View File

@@ -17,16 +17,16 @@ namespace testing {
namespace {
struct Aggregate {
int _π;
int _%ARG%;
};
void test_get_name() {
BOOST_TEST_EQ( ((boost::pfr::get_name<0, Aggregate>())), "_π");
BOOST_TEST_EQ( ((boost::pfr::get_name<0, Aggregate>())), "_%ARG%");
}
void test_names_as_array() {
const auto expected = std::array<std::string_view, 1>{
"_π"
"_%ARG%"
};
const auto value = boost::pfr::names_as_array<Aggregate>();
BOOST_TEST_EQ(expected.size(), value.size());