53 if constexpr (std::is_fundamental_v<T>) {
54 if constexpr (std::is_floating_point_v<T>) {
56 }
else if constexpr (std::same_as<T, bool>) {
58 }
else if constexpr (std::same_as<T, char>) {
60 }
else if constexpr (std::is_integral_v<T>) {
66 }
else if constexpr (std::same_as<T, const char*>) {
69 if constexpr (
requires {
typename T::mapped_type; }) {
82 if constexpr (
Index != 0) {
103 name.remove_prefix(
namespaces.top().size() + 2);
109 if (
auto pos = name.rfind(
"::");
pos != std::string_view::npos) {
111 name = name.substr(
pos + 2);
122 if constexpr (T::members::size == 0) {
145 template <
typename T>
void replace_all(std::string &text, std::string_view needle, std::string_view replacement)
Definition python.h:19
std::string code_for()
Definition repr:39
void print_type()
Definition python.h:52
std::size_t indent_level
Definition python.h:27
detail::StringBuffer result
Definition python.h:30
std::stack< std::string > namespaces
Definition python.h:29
auto operator()(T info)
Definition python.h:146
std::size_t indent_amount
Definition python.h:28
auto get_indent() const
Definition python.h:32
auto operator()(T info)
Definition python.h:94
void print_namespaces(std::string_view namespaces_)
Definition python.h:34
static auto fix_namespace(std::string_view namespace_)
Definition python.h:45
Definition reflection/reflect.h:16
Wrapper around std::string.
Definition buffer.h:14
void set_cursor(std::size_t index=std::string::npos)
Definition buffer.h:77