Skip to content

Commit 50edf03

Browse files
committed
Updates to run tests and fixes
1 parent 4e30cc5 commit 50edf03

3 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: CMake
22

33
on:
44
push:
5-
branches: [ master ]
65
pull_request:
7-
branches: [ master ]
86

97
env:
108
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

include/CXXGraph/Node/Node_decl.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
namespace CXXGraph {
2929
template <typename T>
3030
class Node;
31-
template <typename T, typename Stream>
32-
constexpr Stream &operator<<(Stream &os, const Node<T> &node);
31+
template <typename T>
32+
std::ostream &operator<<(std::ostream &os, const Node<T> &node);
3333
template <typename T>
3434
class Node {
3535
private:
@@ -45,15 +45,15 @@ class Node {
4545
// Move constructor
4646
explicit Node(const std::string &, T &&data) noexcept;
4747
~Node() = default;
48-
const CXXGraph::id_t &getId() const;
48+
constexpr const CXXGraph::id_t &getId() const;
4949
const std::string &getUserId() const;
50-
const T &getData() const;
50+
constexpr const T &getData() const;
5151
void setData(T &&new_data);
5252
// operator
53-
bool operator==(const Node<T> &b) const;
54-
bool operator<(const Node<T> &b) const;
55-
template<typename Stream>
56-
friend Stream &operator<< <>(Stream &os, const Node<T> &node);
53+
constexpr bool operator==(const Node<T> &b) const;
54+
constexpr bool operator<(const Node<T> &b) const;
55+
56+
friend std::ostream &operator<< <>(std::ostream &os, const Node<T> &node);
5757
};
5858

5959
} // namespace CXXGraph

include/CXXGraph/Node/Node_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ constexpr bool Node<T>::operator<(const Node<T> &b) const {
8383

8484
// ostream overload
8585
// The data type T must have an overload of the ostream operator
86-
template <typename T, typename Stream>
87-
constexpr Stream &operator<<(Stream &os, const Node<T> &node) {
86+
template <typename T>
87+
std::ostream &operator<<(std::ostream &os, const Node<T> &node) {
8888
os << "Node: {\n"
8989
<< " Id:\t" << node.userId << "\n Data:\t" << node.data << "\n}";
9090
return os;

0 commit comments

Comments
 (0)