aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/retriever/configkeyset.hpp
blob: c9f989b827115ed06f3e63fd0c01f589d0c1f0d3 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

namespace config {


template <typename... ConfigTypes>
ConfigKeySet &
ConfigKeySet::add(const vespalib::string & configId)
{
    addImpl<ConfigTypes...>(configId);
    return *this;
}

template <typename ConfigType, typename... ConfigTypes>
void
ConfigKeySet::addImpl(const vespalib::string & configId)
{
    insert(ConfigKey::create<ConfigType>(configId));
    if constexpr(sizeof...(ConfigTypes) > 0) {
        addImpl<ConfigTypes...>(configId);
    }
}

}