File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,14 @@ namespace sysstr
62
62
};
63
63
64
64
template <class T , class Storage >
65
- concept addable = sys_string_or_char<T, Storage> || (
66
- std::ranges::forward_range<T> &&
67
- has_utf_encoding<std::ranges::range_value_t <T>>
68
- );
65
+ concept addable = sys_string_or_char<T, Storage> ||
66
+ (
67
+ std::ranges::forward_range<T> &&
68
+ has_utf_encoding<std::ranges::range_value_t <T>>
69
+ ) || (
70
+ std::is_pointer_v<std::decay_t <T>> &&
71
+ has_utf_encoding<std::remove_const_t <std::remove_pointer_t <std::decay_t <T>>>>
72
+ );
69
73
}
70
74
71
75
namespace sysstr ::util
Original file line number Diff line number Diff line change @@ -740,6 +740,9 @@ TEST_CASE( "Addition" ) {
740
740
CHECK (((" a" sv + S (" b" )) + (S (" 💾" ) + " 💿" s)) + (" 🜇" s + S (" ⏰" )) == S (" ab💾💿🜇⏰" ));
741
741
sys_string result = S (" a" ) + U' b' + " cd" + " ef" s + u" gh" sv + U" ij" + std::vector{' k' , ' l' };
742
742
CHECK (result == S (" abcdefghijkl" ));
743
+
744
+ const char * foo = " abc" ;
745
+ CHECK (S (" x" ) + foo == " xabc" );
743
746
}
744
747
745
748
TEST_CASE ( " c_str" ) {
You can’t perform that action at this time.
0 commit comments