Skip to content

Commit

Permalink
Fix AsHex const handling
Browse files Browse the repository at this point in the history
  • Loading branch information
arBmind committed Jun 6, 2024
1 parent 17e3eb2 commit 7fd7769
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/array19.lib/array19/DynamicArrayOf.AsHex.ostream.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ template<class T> struct AsHex<DynamicArrayOf<T>> {
const Array& a;

template<class Chr, class Traits>
friend auto operator<<(std::basic_ostream<Chr, Traits>& out, AsHex<Array>&& a) -> decltype(out)& {
friend auto operator<<(std::basic_ostream<Chr, Traits>& out, AsHex<Array>&& asHex) -> decltype(out)& {
out << "[";
bool first = true;
for (auto& v : a.a) {
for (auto& v : asHex.a) {
if (first)
first = false;
else
Expand All @@ -27,6 +27,6 @@ template<class T> struct AsHex<DynamicArrayOf<T>> {
}
};

template<class T> AsHex(DynamicArrayOf<T>&&) -> AsHex<DynamicArrayOf<T>>;
template<class T> AsHex(const DynamicArrayOf<T>&) -> AsHex<DynamicArrayOf<T>>;

} // namespace array19

0 comments on commit 7fd7769

Please sign in to comment.