Regina 7.3 Calculation Engine
Classes | Namespaces | Typedefs | Functions
typeutils.h File Reference

Provides helper classes for use with template metaprogramming and type analysis. The need for these will likely diminish as Regina switches to use more modern C++ standards. More...

#include <functional>
#include <typeinfo>
#include <variant>
#include "regina-core.h"

Classes

struct  regina::EnableIf< condition, T, defaultValue >
 A struct that holds either a single value of type T or nothing at all, depending on whether the given compile-time condition holds. More...
 

Namespaces

namespace  regina
 Contains the entire Regina calculation engine.
 

Typedefs

template<int pos, typename tuple , typename out_of_range = void>
using regina::safe_tuple_element = typename regina::detail::safe_tuple_element_impl< pos, tuple, out_of_range >::type
 An alternative to std::tuple_element that gracefully handles an out-of-range index. More...
 

Functions

template<int from, int to, class Action >
constexpr void regina::for_constexpr (Action &&action)
 Implements a compile-time for loop over a range of integers. More...
 
template<int from, int to, typename Return , class Action >
constexpr Return regina::select_constexpr (int value, Action &&action)
 Implements a compile-time selection, where the runtime argument must belong to a compile-time range of integers, and the value of the argument determines what is returned. More...
 
template<int from, int to, class Action >
constexpr auto regina::select_constexpr_as_variant (int value, Action &&action)
 A variant of select_constexpr() where the return type is a variant, built from the return types for all integers in the given compile-time range. More...
 
const char * regina::pythonTypename (const std::type_info *t)
 Returns the preferred Python display name for the given C++ type. More...
 

Detailed Description

Provides helper classes for use with template metaprogramming and type analysis. The need for these will likely diminish as Regina switches to use more modern C++ standards.


Copyright © 1999-2023, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).