Skip to content

Commit

Permalink
Not use more char traits.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinH committed Nov 18, 2024
1 parent aec3572 commit c4067d9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions include/tao/pegtl/internal/resize_uninitialized.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ namespace TAO_PEGTL_NAMESPACE::internal
{
// declare some functions...
void resize_uninitialized_proxy( std::string& v, const std::size_t n );
void resize_uninitialized_proxy( std::basic_string< unsigned char >& v, const std::size_t n );
void resize_uninitialized_proxy( std::basic_string< std::byte >& v, const std::size_t n );
// void resize_uninitialized_proxy( std::basic_string< unsigned char >& v, const std::size_t n );
// void resize_uninitialized_proxy( std::basic_string< std::byte >& v, const std::size_t n );

#if defined( _LIBCPP_STRING )

Expand All @@ -39,8 +39,8 @@ namespace TAO_PEGTL_NAMESPACE::internal
// ...and here's the actual "trick": an explicit template instantiation skips the access checks,
// so you can reference private members and forward them to the above proxy!
template struct proxy< std::string, &std::string::__set_size >;
template struct proxy< std::basic_string< unsigned char >, &std::basic_string< unsigned char >::__set_size >;
template struct proxy< std::basic_string< std::byte >, &std::basic_string< std::byte >::__set_size >;
// template struct proxy< std::basic_string< unsigned char >, &std::basic_string< unsigned char >::__set_size >;
// template struct proxy< std::basic_string< std::byte >, &std::basic_string< std::byte >::__set_size >;

#elif defined( _GLIBCXX_STRING ) && _GLIBCXX_USE_CXX11_ABI

Expand All @@ -54,8 +54,8 @@ namespace TAO_PEGTL_NAMESPACE::internal
};

template struct proxy< std::string, &std::string::_M_set_length >;
template struct proxy< std::basic_string< unsigned char >, &std::basic_string< unsigned char >::_M_set_length >;
template struct proxy< std::basic_string< std::byte >, &std::basic_string< std::byte >::_M_set_length >;
// template struct proxy< std::basic_string< unsigned char >, &std::basic_string< unsigned char >::_M_set_length >;
// template struct proxy< std::basic_string< std::byte >, &std::basic_string< std::byte >::_M_set_length >;

#elif defined( _GLIBCXX_STRING )

Expand All @@ -75,13 +75,13 @@ namespace TAO_PEGTL_NAMESPACE::internal
std::string::_Rep,
&std::string::_M_rep >;

template struct proxy< std::basic_string< unsigned char >,
std::basic_string< unsigned char >::_Rep,
&std::basic_string< unsigned char >::_M_rep >;
// template struct proxy< std::basic_string< unsigned char >,
// std::basic_string< unsigned char >::_Rep,
// &std::basic_string< unsigned char >::_M_rep >;

template struct proxy< std::basic_string< std::byte >,
std::basic_string< std::byte >::_Rep,
&std::basic_string< std::byte >::_M_rep >;
// template struct proxy< std::basic_string< std::byte >,
// std::basic_string< std::byte >::_Rep,
// &std::basic_string< std::byte >::_M_rep >;

#elif defined( _MSC_VER )

Expand All @@ -95,8 +95,8 @@ namespace TAO_PEGTL_NAMESPACE::internal
};

template struct proxy< std::string, &std::string::_Eos >;
template struct proxy< std::basic_string< unsigned char >, &std::basic_string< unsigned char >::_Eos >;
template struct proxy< std::basic_string< std::byte >, &std::basic_string< std::byte >::_Eos >;
// template struct proxy< std::basic_string< unsigned char >, &std::basic_string< unsigned char >::_Eos >;
// template struct proxy< std::basic_string< std::byte >, &std::basic_string< std::byte >::_Eos >;

#else
#error "No implementation for resize_uninitialized available."
Expand Down

0 comments on commit c4067d9

Please sign in to comment.