forked from Kistler-Group/sdbus-cpp
feat: add support for string_view as D-Bus type
This commit is contained in:
@@ -100,6 +100,7 @@ namespace sdbus {
|
||||
Message& operator<<(double item);
|
||||
Message& operator<<(const char *item);
|
||||
Message& operator<<(const std::string &item);
|
||||
Message& operator<<(std::string_view item);
|
||||
Message& operator<<(const Variant &item);
|
||||
template <typename ...Elements>
|
||||
Message& operator<<(const std::variant<Elements...>& value);
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
# endif
|
||||
#endif
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
@@ -231,6 +232,10 @@ namespace sdbus {
|
||||
static constexpr bool is_trivial_dbus_type = false;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct signature_of<std::string_view> : signature_of<std::string>
|
||||
{};
|
||||
|
||||
template <>
|
||||
struct signature_of<char*> : signature_of<std::string>
|
||||
{};
|
||||
|
||||
Reference in New Issue
Block a user