Wildmeshing Toolkit
variant_comparison.hpp
Go to the documentation of this file.
1 #pragma once
3 
5 
6 template <typename T>
10 {
11  return std::visit(
12  [&](const auto& v) noexcept {
13  if constexpr (std::is_same_v<TypedAttributeHandle<T>, std::decay_t<decltype(v)>>) {
14  return v == a;
15 
16  } else {
17  return false;
18  }
19  },
20  var);
21 }
22 
23 } // namespace wmtk::attribute::utils
std::variant< TypedAttributeHandle< char >, TypedAttributeHandle< int64_t >, TypedAttributeHandle< double >, TypedAttributeHandle< wmtk::Rational > > HandleVariant
Handle that represents attributes for some mesh.
bool variant_comparison(const TypedAttributeHandle< T > &a, const MeshAttributeHandle::HandleVariant &var)