aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/test/btree/aggregated_printer.h
blob: c1e814a0231adfde3070a4d714474051f5385d9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/btree/noaggregated.h>
#include <vespa/vespalib/btree/minmaxaggregated.h>

namespace vespalib::btree::test {

template <typename ostream, typename Aggregated>
void printAggregated(ostream &os, const Aggregated &aggr);

template <typename ostream>
void printAggregated(ostream &os, const NoAggregated &aggr)
{
    (void) os;
    (void) aggr;
}

template <typename ostream>
void printAggregated(ostream &os, const MinMaxAggregated &aggr)
{
    os << "[min=" << aggr.getMin() << ",max=" << aggr.getMax() << "]";
}

} // namespace vespalib::btree::test