CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
Loading...
Searching...
No Matches
templateHelpers.h
Go to the documentation of this file.
1#ifndef COMMA_PROJECT_TEMPLATE_HELPERS_H
2#define COMMA_PROJECT_TEMPLATE_HELPERS_H
3
4/*
5 * CoMMA
6 *
7 * Copyright © 2024 ONERA
8 *
9 * Authors: Nicolas Lantos, Alberto Remigi, and Riccardo Milani
10 * Contributors: Karim Anemiche
11 *
12 * This Source Code Form is subject to the terms of the Mozilla Public
13 * License, v. 2.0. If a copy of the MPL was not distributed with this
14 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
15 */
16
17namespace comma {
18
29template<bool condition, typename typeA, typename typeB>
30void fill_value(typeA &a, typeB &b) {
31 if constexpr (condition) {
32 a = b;
33 }
34}
35
36} // end namespace comma
37
38#endif
Definition: Agglomerator.h:37
void fill_value(typeA &a, typeB &b)
Assign from type to another only if a compile-time condition is verified.
Definition: templateHelpers.h:30