MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / print_stream_impl

Function print_stream_impl

test/include/test.hpp:154–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153template <class Stream, class T>
154auto print_stream_impl(rank<2>, Stream& s, const T& x)
155 -> decltype(s << x) // NOLINT(bugprone-multi-level-implicit-pointer-conversion)
156{
157 if constexpr(std::is_pointer<T>{})
158 {
159 return s << static_cast<const void*>(x);
160 }
161 else if constexpr(std::is_same<T, bool>{})
162 {
163 if(x)
164 s << "true";
165 else
166 s << "false";
167 return s;
168 }
169 else
170 {
171 return s << x;
172 }
173}
174
175template <class Stream, class T, class U>
176Stream& print_stream_impl(rank<3>, Stream& s, const std::pair<T, U>& p)

Callers 1

print_streamFunction · 0.70

Calls 2

print_streamFunction · 0.70
valueMethod · 0.45

Tested by

no test coverage detected