* but we have this one function in an internal namespace that is a friend
* of the class and can be used to create the objects.
*/
- dealii::ReferenceCell
+ constexpr dealii::ReferenceCell
make_reference_cell_from_int(const std::uint8_t kind);
} // namespace ReferenceCell
} // namespace internal
* A kind of constructor -- not quite private because it can be
* called by anyone, but at least hidden in an internal namespace.
*/
- friend ReferenceCell
+ friend constexpr ReferenceCell
internal::ReferenceCell::make_reference_cell_from_int(const std::uint8_t);
};
+namespace internal
+{
+ namespace ReferenceCell
+ {
+ constexpr dealii::ReferenceCell
+ make_reference_cell_from_int(const std::uint8_t kind)
+ {
+ // Make sure these are the only indices from which objects can be
+ // created.
+ Assert((kind == static_cast<std::uint8_t>(-1)) || (kind < 8),
+ ExcInternalError());
+
+ // Call the private constructor, which we can from here because this
+ // function is a 'friend'.
+ return {kind};
+ }
+ } // namespace ReferenceCell
+} // namespace internal
template <class Archive>
inline void
ReferenceCell::serialize(Archive &archive, const unsigned int /*version*/)
DEAL_II_NAMESPACE_OPEN
-namespace internal
-{
- namespace ReferenceCell
- {
- dealii::ReferenceCell
- make_reference_cell_from_int(const std::uint8_t kind)
- {
- // Make sure these are the only indices from which objects can be
- // created.
- Assert((kind == static_cast<std::uint8_t>(-1)) || (kind < 8),
- ExcInternalError());
-
- // Call the private constructor, which we can from here because this
- // function is a 'friend'.
- return {kind};
- }
- } // namespace ReferenceCell
-} // namespace internal
-
const ReferenceCell ReferenceCell::Vertex =
internal::ReferenceCell::make_reference_cell_from_int(0);