Skip to content

Commit

Permalink
Merge pull request #219 from LLNL/feature/bugfix_json
Browse files Browse the repository at this point in the history
Bugfix: general_string_equal
  • Loading branch information
KIwabuchi committed May 4, 2022
2 parents ad244e9 + 2d625cb commit f470995
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/metall/container/experimental/json/json_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ inline bool general_indexed_object_equal(const indexed_object<allocator_type> &,
template <typename allocator_type, typename other_array_type>
inline bool general_array_equal(const array<allocator_type> &, const other_array_type &) noexcept;

template <typename allocator_type, typename other_string_type>
inline bool general_string_equal(const string<allocator_type> &, const other_string_type &) noexcept;
template <typename char_t, typename traits, typename allocator, typename other_string_type>
inline bool general_string_equal(const string<char_t, traits, allocator> &, const other_string_type &) noexcept;
}
#endif // DOXYGEN_SKIP

Expand Down
5 changes: 3 additions & 2 deletions include/metall/container/experimental/json/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
namespace metall::container::experimental::json {
namespace jsndtl {

template <typename allocator_type, typename other_string_type>
inline bool general_string_equal(const string<allocator_type> &string, const other_string_type &other_string) noexcept {
template <typename char_t, typename traits, typename allocator, typename other_string_type>
inline bool general_string_equal(const string<char_t, traits, allocator> &string,
const other_string_type &other_string) noexcept {
return std::strcmp(string.c_str(), other_string.c_str()) == 0;
}

Expand Down

0 comments on commit f470995

Please sign in to comment.