File: StreamOperators.h

package info (click to toggle)
libformfactor 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,288 kB
  • sloc: cpp: 17,289; python: 382; makefile: 15
file content (21 lines) | stat: -rw-r--r-- 573 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef FORMFACTOR_TEST_UTIL_STREAMOPERATORS_H
#define FORMFACTOR_TEST_UTIL_STREAMOPERATORS_H

#include <heinz/Vectors3D.h>
#include <ostream>
#include <vector>

// Stream operators injected into namespace std to be recognized by catch2

namespace std {
std::ostream& operator<<(std::ostream& os, const std::vector<R3>& vertices)
{
    os << "{";
    for (const R3& vertex : vertices)
        os << "{" << vertex.x() << ", " << vertex.y() << ", " << vertex.z() << "}, ";
    os << "}";
    return os;
}
}; // namespace std

#endif // FORMFACTOR_TEST_UTIL_STREAMOPERATORS_H