Skip to content

Commit

Permalink
Further simplifications for std::string
Browse files Browse the repository at this point in the history
    * ddsx11/vendors/ndds/dds/ndds_base_traits.h:
  • Loading branch information
jwillemsen committed Oct 5, 2024
1 parent ae4f9b7 commit ac01bbe
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions ddsx11/vendors/ndds/dds/ndds_base_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ namespace DDSX11
struct traits<std::string>
: public common_traits<std::string, std::string>,
public convert_in<std::string, std::string>,
public convert_retn<std::string, std::string>
public pass_out_by_ref<std::string>,
public pass_retn<std::string>
{
struct in
{
Expand All @@ -179,24 +180,6 @@ namespace DDSX11
operator dds_in_type () { return this->value_; }
operator const char* () { return this->value_.c_str (); }
};

// special for strings
struct out
{
typedef std::string out_type;
typedef std::string dds_out_type;
out_type& value_;

out (out_type& v) : value_ (v) { }
~out () = default;
operator dds_out_type () { return this->value_; }
};

struct inout : public out
{
inout (out::out_type& v) : out (v) { }
operator out::dds_out_type () { return this->value_; }
};
};

/// long double types.
Expand Down

0 comments on commit ac01bbe

Please sign in to comment.