Skip to content

Commit 56fe1f6

Browse files
committed
Don't export template functions
1 parent 347eab7 commit 56fe1f6

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

include/adm/detail/auto_base.hpp

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ namespace adm {
168168
using ParameterType = T;
169169
static constexpr bool has_get_set_has = true;
170170

171-
ADM_BASE_EXPORT T get(Tag) const { return value_; }
172-
ADM_BASE_EXPORT void set(T value) { value_ = std::move(value); }
173-
ADM_BASE_EXPORT bool has(Tag) const { return true; }
171+
T get(Tag) const { return value_; }
172+
void set(T value) { value_ = std::move(value); }
173+
bool has(Tag) const { return true; }
174174

175175
private:
176176
T value_;
@@ -187,11 +187,11 @@ namespace adm {
187187
static constexpr bool has_get_set_has = true;
188188
static constexpr bool has_isDefault_unset = true;
189189

190-
ADM_BASE_EXPORT T get(Tag) const { return value_.get(); }
191-
ADM_BASE_EXPORT void set(T value) { value_ = std::move(value); }
192-
ADM_BASE_EXPORT bool has(Tag) const { return value_ != boost::none; }
193-
ADM_BASE_EXPORT bool isDefault(Tag) const { return false; }
194-
ADM_BASE_EXPORT void unset(Tag) { value_ = boost::none; }
190+
T get(Tag) const { return value_.get(); }
191+
void set(T value) { value_ = std::move(value); }
192+
bool has(Tag) const { return value_ != boost::none; }
193+
bool isDefault(Tag) const { return false; }
194+
void unset(Tag) { value_ = boost::none; }
195195

196196
private:
197197
boost::optional<T> value_;
@@ -208,15 +208,15 @@ namespace adm {
208208
static constexpr bool has_get_set_has = true;
209209
static constexpr bool has_isDefault_unset = true;
210210

211-
ADM_BASE_EXPORT T get(Tag) const {
211+
T get(Tag) const {
212212
return boost::get_optional_value_or(value_, getDefault<T>());
213213
}
214-
ADM_BASE_EXPORT void set(T value) { value_ = std::move(value); }
215-
ADM_BASE_EXPORT bool has(Tag) const { return true; }
216-
ADM_BASE_EXPORT bool isDefault(Tag) const {
214+
void set(T value) { value_ = std::move(value); }
215+
bool has(Tag) const { return true; }
216+
bool isDefault(Tag) const {
217217
return value_ == boost::none;
218218
}
219-
ADM_BASE_EXPORT void unset(Tag) { value_ = boost::none; }
219+
void unset(Tag) { value_ = boost::none; }
220220

221221
private:
222222
boost::optional<T> value_;
@@ -241,13 +241,13 @@ namespace adm {
241241
static constexpr bool has_isDefault_unset = true;
242242
static constexpr bool has_add_remove = true;
243243

244-
ADM_BASE_EXPORT T get(Tag) const { return value_; }
245-
ADM_BASE_EXPORT void set(T value) { value_ = std::move(value); }
246-
ADM_BASE_EXPORT bool has(Tag) const { return value_.size() > 0; }
247-
ADM_BASE_EXPORT bool isDefault(Tag) const { return false; }
248-
ADM_BASE_EXPORT void unset(Tag) { value_.clear(); }
244+
T get(Tag) const { return value_; }
245+
void set(T value) { value_ = std::move(value); }
246+
bool has(Tag) const { return value_.size() > 0; }
247+
bool isDefault(Tag) const { return false; }
248+
void unset(Tag) { value_.clear(); }
249249

250-
ADM_BASE_EXPORT bool add(Value item) {
250+
bool add(Value item) {
251251
auto it = find_item(item);
252252
if (it == value_.end()) {
253253
value_.push_back(std::move(item));
@@ -257,14 +257,14 @@ namespace adm {
257257
}
258258
}
259259

260-
ADM_BASE_EXPORT void remove(Value const& item) {
260+
void remove(Value const& item) {
261261
auto it = find_item(item);
262262
if (it != value_.end()) value_.erase(it);
263263
}
264264

265265
private:
266266
T value_;
267-
ADM_BASE_EXPORT typename T::iterator find_item(Value const& item) {
267+
typename T::iterator find_item(Value const& item) {
268268
return std::find_if(
269269
value_.begin(), value_.end(), [&item](Value const& val) {
270270
return ParameterCompare<Value>::compare(item, val);
@@ -285,27 +285,27 @@ namespace adm {
285285

286286
public:
287287
using VariantParam::get;
288-
ADM_BASE_EXPORT T get(Tag) const {
288+
T get(Tag) const {
289289
return boost::get<T>(get(VariantTag{}));
290290
}
291291

292292
using VariantParam::set;
293-
ADM_BASE_EXPORT void set(T value) {
293+
void set(T value) {
294294
return VariantParam::set(std::move(value));
295295
}
296296

297297
using VariantParam::has;
298-
ADM_BASE_EXPORT bool has(Tag) const {
298+
bool has(Tag) const {
299299
return has(VariantTag{}) && get(VariantTag()).type() == typeid(T);
300300
}
301301

302302
using VariantParam::isDefault;
303-
ADM_BASE_EXPORT bool isDefault(Tag) const {
303+
bool isDefault(Tag) const {
304304
return isDefault(VariantTag()) && get(VariantTag()).type() == typeid(T);
305305
}
306306

307307
using VariantParam::unset;
308-
ADM_BASE_EXPORT void unset(Tag) {
308+
void unset(Tag) {
309309
if (has(Tag{})) unset(VariantTag{});
310310
}
311311
};

0 commit comments

Comments
 (0)