Skip to content

Commit

Permalink
return empty string
Browse files Browse the repository at this point in the history
Signed-off-by: Byoungro So <byoungro.so@intel.com>
  • Loading branch information
bso-intel committed Feb 6, 2024
1 parent 8fc92b8 commit f9a9af4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sycl/include/sycl/detail/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class string {
return *this;
}

const char *c_str() const noexcept { return str; }
const char *c_str() const noexcept { return str ? str : ""; }

friend bool operator==(const string &lhs, std::string_view rhs) noexcept {
return rhs == lhs.c_str();
Expand Down

0 comments on commit f9a9af4

Please sign in to comment.