File tree Expand file tree Collapse file tree
Sources/CMathWrapper/include Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,13 +26,6 @@ class Math {
2626private:
2727 MathRef ref_;
2828
29- // Private constructor from MathRef (takes ownership)
30- explicit Math (MathRef ref) : ref_(ref) {
31- if (!ref_) {
32- throw std::runtime_error (" Failed to create Math object" );
33- }
34- }
35-
3629public:
3730 // Constructors
3831 Math (long long value) : ref_(math_create_int(value)) {
@@ -51,6 +44,13 @@ class Math {
5144
5245 Math (const char * value) : Math(std::string(value)) {}
5346
47+ // Internal constructor from MathRef (for internal use and Constants namespace)
48+ explicit Math (MathRef ref) : ref_(ref) {
49+ if (!ref_) {
50+ throw std::runtime_error (" Failed to create Math object" );
51+ }
52+ }
53+
5454 // Copy constructor
5555 Math (const Math& other) : ref_(math_copy(other.ref_)) {
5656 if (!ref_) throw std::runtime_error (" Failed to copy Math object" );
You can’t perform that action at this time.
0 commit comments