#include <deal.II/base/config.h>
-#ifdef DEAL_II_HAVE_CXX17
-# include <algorithm>
-#else
-# include <boost/algorithm/clamp.hpp>
-#endif
+#include <algorithm>
DEAL_II_NAMESPACE_OPEN
namespace std_cxx17
{
-#ifndef DEAL_II_HAVE_CXX17
- using boost::algorithm::clamp;
-#else
using std::clamp;
-#endif
} // namespace std_cxx17
DEAL_II_NAMESPACE_CLOSE
#include <deal.II/base/config.h>
-#ifdef DEAL_II_HAVE_CXX17
-# include <optional>
-#else
-# include <boost/optional.hpp>
-#endif
+#include <optional>
DEAL_II_NAMESPACE_OPEN
namespace std_cxx17
{
-#ifndef DEAL_II_HAVE_CXX17
- using boost::optional;
-#else
using std::optional;
-#endif
} // namespace std_cxx17
DEAL_II_NAMESPACE_CLOSE
#include <deal.II/base/config.h>
-#ifdef DEAL_II_HAVE_CXX17
-# include <variant>
-#else
-# include <boost/variant.hpp>
-#endif
+#include <variant>
DEAL_II_NAMESPACE_OPEN
namespace std_cxx17
{
-#ifndef DEAL_II_HAVE_CXX17
- using boost::get;
- using boost::variant;
-
- template <typename T, typename... Ts>
- bool
- holds_alternative(const boost::variant<Ts...> &v) noexcept
- {
- return boost::get<T>(&v) != nullptr;
- }
-#else
using std::get;
using std::holds_alternative;
using std::variant;
-#endif
} // namespace std_cxx17
DEAL_II_NAMESPACE_CLOSE
* readers-writer lock
* (https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock).
*/
-# ifdef DEAL_II_HAVE_CXX17
mutable std::shared_mutex insertion_mutex;
-# else
- mutable std::shared_timed_mutex insertion_mutex;
-# endif
/**
* An exemplar for creating a new (thread specific) copy.
}
// First import what kind of reference cell we are looking at:
-#ifdef DEAL_II_HAVE_CXX17
if constexpr (dim > 0)
in >> patch.reference_cell;
-#else
- // If we can't use 'if constexpr', work around the fact that we can't
- // write to a 'const' variable by using a const_cast that is a no-op
- // whenever the code is actually executed
- if (dim > 0)
- in >> const_cast<ReferenceCell &>(patch.reference_cell);
-#endif
// then read all the data that is in this patch
for (const unsigned int i : patch.reference_cell.vertex_indices())
// in dim==1, this is a const variable equal to one that can't be changed.
unsigned int n_subdivisions;
in >> n_subdivisions;
-#ifdef DEAL_II_HAVE_CXX17
if constexpr (dim > 1)
patch.n_subdivisions = n_subdivisions;
-#else
- // If we can't use 'if constexpr', work around the fact that we can't
- // write to a 'const' variable by using a const_cast that is a no-op
- // whenever the code is actually executed
- if (dim > 1)
- const_cast<unsigned int &>(patch.n_subdivisions) = n_subdivisions;
-#endif
in >> patch.points_are_available;
else
ss.setf(std::ios::fixed, std::ios::floatfield);
-#ifdef DEAL_II_HAVE_CXX17
std::visit([&ss](auto &v) { ss << v; }, value);
-#else
- ss << value;
-#endif
cached_value = ss.str();
if (cached_value.size() == 0)
return cached_value;
}
-
-#ifndef DEAL_II_HAVE_CXX17
- namespace Local
- {
- // see which type we can cast to, then use this type to create
- // a default constructed object
- struct SetValueToDefault : public boost::static_visitor<>
- {
- template <typename T>
- void
- operator()(T &operand) const
- {
- operand = T();
- }
- };
- } // namespace Local
-#endif
-
TableEntry
TableEntry::get_default_constructed_copy() const
{
TableEntry new_entry = *this;
-#ifndef DEAL_II_HAVE_CXX17
- boost::apply_visitor(Local::SetValueToDefault(), new_entry.value);
-#else
// Let std::visit figure out which data type is actually stored,
// and then set the object so stored to a default-constructed
// one.
std::visit([](
auto &arg) { arg = std::remove_reference_t<decltype(arg)>(); },
new_entry.value);
-#endif
return new_entry;
}
else
out.setf(std::ios::fixed, std::ios::floatfield);
-#ifdef DEAL_II_HAVE_CXX17
std::visit([&out](auto &v) { out << v; }, column.entries[i].value);
-#else
- out << column.entries[i].value;
-#endif
if (j < n_cols - 1)
out << " & ";
double minDistance = 1e7;
gp_Pnt tmp_proj(0.0, 0.0, 0.0);
-# ifdef DEAL_II_HAVE_CXX17
- [[maybe_unused]] unsigned int counter = 0;
-# else
- unsigned int counter = 0;
- (void)counter;
-# endif
- unsigned int face_counter = 0;
+ [[maybe_unused]] unsigned int counter = 0;
+ unsigned int face_counter = 0;
TopoDS_Shape out_shape;
double u = 0;
const unsigned int nsub = p + 1;
const unsigned int nsubp = nsub + 1;
-#ifdef DEAL_II_HAVE_CXX17
if constexpr (dim > 0)
patch.n_subdivisions = nsub;
-#else
- if (dim > 0)
- const_cast<unsigned int &>(patch.n_subdivisions) = nsub;
-#endif
-#ifdef DEAL_II_HAVE_CXX17
if constexpr (dim > 0)
patch.reference_cell = ReferenceCells::get_hypercube<dim>();
-#else
- if (dim > 0)
- const_cast<ReferenceCell &>(patch.reference_cell) =
- ReferenceCells::get_hypercube<dim>();
-#endif
for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
for (unsigned int d = 0; d < spacedim; ++d)