Skip to content

Commit

Permalink
Restrict copying and moving for c_str_proxy class
Browse files Browse the repository at this point in the history
  • Loading branch information
beached committed Feb 5, 2025
1 parent 9d91b08 commit 0b1f7f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/daw/daw_string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,12 @@ namespace daw {
}

public:
~c_str_proxy( ) = default;
c_str_proxy( c_str_proxy const & ) = delete;
c_str_proxy( c_str_proxy && ) = delete;
c_str_proxy &operator=( c_str_proxy const & ) = delete;
c_str_proxy &operator=( c_str_proxy && ) = delete;

DAW_CPP20_CX_ALLOC CharT const *c_str( ) const noexcept {
return daw::visit_nt( m_str, []( auto const &s ) {
return s.data( );
Expand Down

0 comments on commit 0b1f7f8

Please sign in to comment.