@@ -73,40 +73,40 @@ class Child {
73
73
74
74
// TODO: Look in to making these references instead of pointer returns
75
75
/* * @brief Get the Child's parent. */
76
- constexpr Child *get_parent () noexcept { return parent; }
77
- constexpr const Child *get_parent () const noexcept {
76
+ Child *get_parent () noexcept { return parent; }
77
+ const Child *get_parent () const noexcept {
78
78
return const_cast <Child *>(parent);
79
79
}
80
80
81
81
template <class C >
82
- constexpr C get_parent_as () noexcept {
82
+ C get_parent_as () noexcept {
83
83
return static_cast <C>(get_parent ());
84
84
}
85
85
86
86
/* * @brief Set the Child's parent */
87
- constexpr void set_parent (Child *parent) noexcept { this ->parent = parent; }
88
- constexpr void set_parent (const Child *parent) noexcept {
87
+ void set_parent (Child *parent) noexcept { this ->parent = parent; }
88
+ void set_parent (const Child *parent) noexcept {
89
89
this ->parent = const_cast <Child *>(parent);
90
90
}
91
91
92
92
/* --------- Formatter helper functions -----------*/
93
93
// Check to see if the tree has a printer
94
- constexpr const bool has_formatter () noexcept ;
94
+ const bool has_formatter () noexcept ;
95
95
96
96
// Get the printer from the tree
97
- constexpr Formatters::BaseFormatter &get_formatter () noexcept ;
97
+ Formatters::BaseFormatter &get_formatter () noexcept ;
98
98
99
- constexpr void set_printer (const Formatters::BaseFormatter &formatter) {
99
+ void set_printer (const Formatters::BaseFormatter &formatter) {
100
100
this ->formatter = &const_cast <Formatters::BaseFormatter &>(formatter);
101
101
}
102
102
103
103
/* --------- Primary member functions -------------*/
104
104
105
105
/* * @brief Get the status of the object (success/failure) */
106
- constexpr const bool get_status () noexcept { return this ->status ; }
107
- constexpr const bool get_status () const noexcept { return this ->status ; }
106
+ const bool get_status () noexcept { return this ->status ; }
107
+ const bool get_status () const noexcept { return this ->status ; }
108
108
109
- constexpr void failed () noexcept ; // Report failure to the object.
109
+ void failed () noexcept ; // Report failure to the object.
110
110
111
111
// Calculate the padding for printing this object
112
112
std::string padding () noexcept ;
@@ -120,7 +120,7 @@ class Child {
120
120
* This is propogated up the parent/child tree, so that when a child object
121
121
* fails, the parent object is immediately updated to reflect that as well.
122
122
*/
123
- constexpr inline void Child::failed () noexcept {
123
+ inline void Child::failed () noexcept {
124
124
this ->status = false ;
125
125
// propogates the failure up the tree
126
126
if (has_parent ()) this ->get_parent ()->failed ();
@@ -134,13 +134,13 @@ inline std::string Child::padding() noexcept {
134
134
return has_parent () ? get_parent ()->padding () + " " : " " ;
135
135
}
136
136
137
- constexpr inline const bool Child::has_formatter () noexcept {
137
+ inline const bool Child::has_formatter () noexcept {
138
138
if (this ->formatter != nullptr ) return true ;
139
139
if (!this ->has_parent ()) return false ; // base case;
140
140
return parent->has_formatter ();
141
141
}
142
142
143
- constexpr inline Formatters::BaseFormatter &Child::get_formatter () noexcept {
143
+ inline Formatters::BaseFormatter &Child::get_formatter () noexcept {
144
144
if (this ->formatter ) return *formatter;
145
145
if (!this ->has_parent ()) std::terminate ();
146
146
return parent->get_formatter ();
0 commit comments