Skip to content

Commit

Permalink
Merge pull request #104 from DenisBiryukov91/fix/std-nullptr
Browse files Browse the repository at this point in the history
add missing std:: prefix to nullptr_t
  • Loading branch information
milyin authored Mar 10, 2024
2 parents 72cedc9 + 10875f5 commit c0b7adb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/zenohcxx/api.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class BytesView : public Copyable<::z_bytes_t> {
/// @name Constructors

/// @brief Constructs an uninitialized instance
BytesView(nullptr_t) : Copyable(init(nullptr, 0)) {}
BytesView(std::nullptr_t) : Copyable(init(nullptr, 0)) {}
/// Constructs an instance from an array of bytes
/// @param s the array of bytes
/// @param _len the length of the array
Expand Down Expand Up @@ -507,7 +507,7 @@ struct KeyExprView : public Copyable<::z_keyexpr_t> {
/// @name Constructors

/// @brief Constructs an uninitialized instance
KeyExprView(nullptr_t) : Copyable(::z_keyexpr(nullptr)) {}
KeyExprView(std::nullptr_t) : Copyable(::z_keyexpr(nullptr)) {}
/// @brief Constructs an instance from a null-terminated string representing a key expression.
KeyExprView(const char* name) : Copyable(::z_keyexpr(name)) {}
/// @brief Constructs an instance from a null-terminated string representing a key expression withot validating it
Expand Down Expand Up @@ -1597,7 +1597,7 @@ class KeyExpr : public Owned<::z_owned_keyexpr_t> {
/// @name Constructors

/// @brief Create an uninitialized instance
explicit KeyExpr(nullptr_t) : Owned(nullptr) {}
explicit KeyExpr(std::nullptr_t) : Owned(nullptr) {}

/// @brief Create a new instance from a null-terminated string
explicit KeyExpr(const char* name) : Owned(::z_keyexpr_new(name)) {}
Expand Down Expand Up @@ -1979,7 +1979,7 @@ class Session : public Owned<::z_owned_session_t> {
// generated by the compiler anymore
//
Session(Session&& other) : Owned(std::move(other)) {}
Session(nullptr_t) : Owned(nullptr) {}
Session(std::nullptr_t) : Owned(nullptr) {}
Session&& operator=(Session&& other);
void drop();
~Session() { drop(); }
Expand Down

0 comments on commit c0b7adb

Please sign in to comment.