10#ifndef CHAISCRIPT_BOXED_NUMERIC_HPP_
11#define CHAISCRIPT_BOXED_NUMERIC_HPP_
34 explicit arithmetic_error(
const std::string& reason) :
std::runtime_error(
"Arithmetic error: " + reason) {}
49#pragma warning(disable : 4244 4018 4389 4146 4365 4267 4242)
54#pragma GCC diagnostic push
55#pragma GCC diagnostic ignored "-Wunknown-pragmas"
56#pragma GCC diagnostic ignored "-Wpragmas"
57#pragma GCC diagnostic ignored "-Wsign-compare"
58#pragma GCC diagnostic ignored "-Wfloat-equal"
59#pragma GCC diagnostic ignored "-Wconversion"
60#pragma GCC diagnostic ignored "-Wsign-conversion"
61#pragma GCC diagnostic ignored "-Wfloat-conversion"
68 enum class Common_Types {
83 static inline void check_divide_by_zero(
T t,
typename std::enable_if<std::is_integral<T>::value>::type* =
nullptr)
85#ifndef CHAISCRIPT_NO_PROTECT_DIVIDEBYZERO
93 static inline void check_divide_by_zero(
T,
typename std::enable_if<std::is_floating_point<T>::value>::type* =
nullptr)
97 static constexpr Common_Types get_common_type(
size_t t_size,
bool t_signed)
99 return (t_size == 1 && t_signed)?(Common_Types::t_int8)
100 :(t_size == 1)?(Common_Types::t_uint8)
101 :(t_size == 2 && t_signed)?(Common_Types::t_int16)
102 :(t_size == 2)?(Common_Types::t_uint16)
103 :(t_size == 4 && t_signed)?(Common_Types::t_int32)
104 :(t_size == 4)?(Common_Types::t_uint32)
105 :(t_size == 8 && t_signed)?(Common_Types::t_int64)
106 :(Common_Types::t_uint64);
110 static Common_Types get_common_type(
const Boxed_Value &t_bv)
114 if (inp_ ==
typeid(
int)) {
115 return get_common_type(
sizeof(
int),
true);
116 }
else if (inp_ ==
typeid(
double)) {
117 return Common_Types::t_double;
118 }
else if (inp_ ==
typeid(
long double)) {
119 return Common_Types::t_long_double;
120 }
else if (inp_ ==
typeid(
float)) {
121 return Common_Types::t_float;
122 }
else if (inp_ ==
typeid(
char)) {
123 return get_common_type(
sizeof(
char), std::is_signed<char>::value);
124 }
else if (inp_ ==
typeid(
unsigned char)) {
125 return get_common_type(
sizeof(
unsigned char),
false);
126 }
else if (inp_ ==
typeid(
unsigned int)) {
127 return get_common_type(
sizeof(
unsigned int),
false);
128 }
else if (inp_ ==
typeid(
long)) {
129 return get_common_type(
sizeof(
long),
true);
130 }
else if (inp_ ==
typeid(
long long)) {
131 return get_common_type(
sizeof(
long long),
true);
132 }
else if (inp_ ==
typeid(
unsigned long)) {
133 return get_common_type(
sizeof(
unsigned long),
false);
134 }
else if (inp_ ==
typeid(
unsigned long long)) {
135 return get_common_type(
sizeof(
unsigned long long),
false);
136 }
else if (inp_ ==
typeid(std::int8_t)) {
137 return Common_Types::t_int8;
138 }
else if (inp_ ==
typeid(std::int16_t)) {
139 return Common_Types::t_int16;
140 }
else if (inp_ ==
typeid(std::int32_t)) {
141 return Common_Types::t_int32;
142 }
else if (inp_ ==
typeid(std::int64_t)) {
143 return Common_Types::t_int64;
144 }
else if (inp_ ==
typeid(std::uint8_t)) {
145 return Common_Types::t_uint8;
146 }
else if (inp_ ==
typeid(std::uint16_t)) {
147 return Common_Types::t_uint16;
148 }
else if (inp_ ==
typeid(std::uint32_t)) {
149 return Common_Types::t_uint32;
150 }
else if (inp_ ==
typeid(std::uint64_t)) {
151 return Common_Types::t_uint64;
152 }
else if (inp_ ==
typeid(
wchar_t)) {
153 return get_common_type(
sizeof(
wchar_t), std::is_signed<wchar_t>::value);
154 }
else if (inp_ ==
typeid(
char16_t)) {
155 return get_common_type(
sizeof(
char16_t), std::is_signed<char16_t>::value);
156 }
else if (inp_ ==
typeid(
char32_t)) {
157 return get_common_type(
sizeof(
char32_t), std::is_signed<char32_t>::value);
203 template<
typename T,
typename U>
218 check_divide_by_zero(u);
231 template<
typename T,
typename U>
249 check_divide_by_zero(u);
283 check_divide_by_zero(u);
318 check_divide_by_zero(u);
329 template<
typename LHS,
typename RHS>
331 ->
typename std::enable_if<!std::is_floating_point<LHS>::value && !std::is_floating_point<RHS>::value,
Boxed_Value>::type
333 typedef typename std::common_type<LHS, RHS>::type common_type;
336 return boolean_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs));
338 return binary_go(t_oper, *
static_cast<LHS *
>(t_lhs.
get_ptr()), get_as_aux<common_type, RHS>(t_rhs), t_lhs);
340 return binary_int_go(t_oper, *
static_cast<LHS *
>(t_lhs.
get_ptr()), get_as_aux<common_type, RHS>(t_rhs), t_lhs);
342 return const_binary_int_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs));
344 return const_binary_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs));
350 template<
typename LHS,
typename RHS>
352 ->
typename std::enable_if<std::is_floating_point<LHS>::value || std::is_floating_point<RHS>::value,
Boxed_Value>::type
354 typedef typename std::common_type<LHS, RHS>::type common_type;
357 return boolean_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs));
359 return binary_go(t_oper, *
static_cast<LHS *
>(t_lhs.
get_ptr()), get_as_aux<common_type, RHS>(t_rhs), t_lhs);
361 return const_binary_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs));
368 template<
typename LHS>
370 ->
typename std::enable_if<!std::is_floating_point<LHS>::value,
Boxed_Value>::type
373 return unary_go(t_oper, *
static_cast<LHS *
>(t_lhs.
get_ptr()), t_lhs);
375 return const_unary_int_go(t_oper, *
static_cast<const LHS *
>(t_lhs.
get_const_ptr()));
377 return const_unary_go(t_oper, *
static_cast<const LHS *
>(t_lhs.
get_const_ptr()));
383 template<
typename LHS>
385 ->
typename std::enable_if<std::is_floating_point<LHS>::value,
Boxed_Value>::type
388 return unary_go(t_oper, *
static_cast<LHS *
>(t_lhs.
get_ptr()), t_lhs);
390 return const_unary_go(t_oper, *
static_cast<const LHS *
>(t_lhs.
get_const_ptr()));
396 template<
typename LHS>
399 switch (get_common_type(t_rhs)) {
400 case Common_Types::t_int32:
401 return go<LHS, int32_t>(t_oper, t_lhs, t_rhs);
402 case Common_Types::t_uint8:
403 return go<LHS, uint8_t>(t_oper, t_lhs, t_rhs);
404 case Common_Types::t_int8:
405 return go<LHS, int8_t>(t_oper, t_lhs, t_rhs);
406 case Common_Types::t_uint16:
407 return go<LHS, uint16_t>(t_oper, t_lhs, t_rhs);
408 case Common_Types::t_int16:
409 return go<LHS, int16_t>(t_oper, t_lhs, t_rhs);
410 case Common_Types::t_uint32:
411 return go<LHS, uint32_t>(t_oper, t_lhs, t_rhs);
412 case Common_Types::t_uint64:
413 return go<LHS, uint64_t>(t_oper, t_lhs, t_rhs);
414 case Common_Types::t_int64:
415 return go<LHS, int64_t>(t_oper, t_lhs, t_rhs);
416 case Common_Types::t_double:
417 return go<LHS, double>(t_oper, t_lhs, t_rhs);
418 case Common_Types::t_float:
419 return go<LHS, float>(t_oper, t_lhs, t_rhs);
420 case Common_Types::t_long_double:
421 return go<LHS, long double>(t_oper, t_lhs, t_rhs);
429 switch (get_common_type(t_lhs)) {
430 case Common_Types::t_int32:
431 return go<int32_t>(t_oper, t_lhs);
432 case Common_Types::t_uint8:
433 return go<uint8_t>(t_oper, t_lhs);
434 case Common_Types::t_int8:
435 return go<int8_t>(t_oper, t_lhs);
436 case Common_Types::t_uint16:
437 return go<uint16_t>(t_oper, t_lhs);
438 case Common_Types::t_int16:
439 return go<int16_t>(t_oper, t_lhs);
440 case Common_Types::t_uint32:
441 return go<uint32_t>(t_oper, t_lhs);
442 case Common_Types::t_uint64:
443 return go<uint64_t>(t_oper, t_lhs);
444 case Common_Types::t_int64:
445 return go<int64_t>(t_oper, t_lhs);
446 case Common_Types::t_double:
447 return go<double>(t_oper, t_lhs);
448 case Common_Types::t_float:
449 return go<float>(t_oper, t_lhs);
450 case Common_Types::t_long_double:
451 return go<long double>(t_oper, t_lhs);
460 switch (get_common_type(t_lhs)) {
461 case Common_Types::t_int32:
462 return oper_rhs<int32_t>(t_oper, t_lhs, t_rhs);
463 case Common_Types::t_uint8:
464 return oper_rhs<uint8_t>(t_oper, t_lhs, t_rhs);
465 case Common_Types::t_int8:
466 return oper_rhs<int8_t>(t_oper, t_lhs, t_rhs);
467 case Common_Types::t_uint16:
468 return oper_rhs<uint16_t>(t_oper, t_lhs, t_rhs);
469 case Common_Types::t_int16:
470 return oper_rhs<int16_t>(t_oper, t_lhs, t_rhs);
471 case Common_Types::t_uint32:
472 return oper_rhs<uint32_t>(t_oper, t_lhs, t_rhs);
473 case Common_Types::t_uint64:
474 return oper_rhs<uint64_t>(t_oper, t_lhs, t_rhs);
475 case Common_Types::t_int64:
476 return oper_rhs<int64_t>(t_oper, t_lhs, t_rhs);
477 case Common_Types::t_double:
478 return oper_rhs<double>(t_oper, t_lhs, t_rhs);
479 case Common_Types::t_float:
480 return oper_rhs<float>(t_oper, t_lhs, t_rhs);
481 case Common_Types::t_long_double:
482 return oper_rhs<long double>(t_oper, t_lhs, t_rhs);
488 template<
typename Target,
typename Source>
489 static inline Target get_as_aux(
const Boxed_Value &t_bv)
491 return static_cast<Target
>(*
static_cast<const Source *
>(t_bv.
get_const_ptr()));
494 template<
typename Source>
495 static std::string to_string_aux(
const Boxed_Value &v)
497 std::ostringstream oss;
532 if (inp_ ==
typeid(
double)) {
534 }
else if (inp_ ==
typeid(
long double)) {
536 }
else if (inp_ ==
typeid(
float)) {
595 template<
typename Source,
typename Target>
598#ifdef CHAISCRIPT_MSVC
601#pragma warning(disable : 4127 6287)
603 if (
sizeof(Source) !=
sizeof(Target)
604 || std::is_signed<Source>() != std::is_signed<Target>()
605 || std::is_floating_point<Source>() != std::is_floating_point<Target>())
609#ifdef CHAISCRIPT_MSVC
616 switch (get_common_type(
bv)) {
617 case Common_Types::t_int32:
619 return get_as_aux<Target, int32_t>(
bv);
620 case Common_Types::t_uint8:
622 return get_as_aux<Target, uint8_t>(
bv);
623 case Common_Types::t_int8:
625 return get_as_aux<Target, int8_t>(
bv);
626 case Common_Types::t_uint16:
628 return get_as_aux<Target, uint16_t>(
bv);
629 case Common_Types::t_int16:
631 return get_as_aux<Target, int16_t>(
bv);
632 case Common_Types::t_uint32:
634 return get_as_aux<Target, uint32_t>(
bv);
635 case Common_Types::t_uint64:
637 return get_as_aux<Target, uint64_t>(
bv);
638 case Common_Types::t_int64:
640 return get_as_aux<Target, int64_t>(
bv);
641 case Common_Types::t_double:
643 return get_as_aux<Target, double>(
bv);
644 case Common_Types::t_float:
646 return get_as_aux<Target, float>(
bv);
647 case Common_Types::t_long_double:
649 return get_as_aux<Target, long double>(
bv);
656 template<
typename Target> Target
get_as()
const
658 switch (get_common_type(
bv)) {
659 case Common_Types::t_int32:
660 return get_as_aux<Target, int32_t>(
bv);
661 case Common_Types::t_uint8:
662 return get_as_aux<Target, uint8_t>(
bv);
663 case Common_Types::t_int8:
664 return get_as_aux<Target, int8_t>(
bv);
665 case Common_Types::t_uint16:
666 return get_as_aux<Target, uint16_t>(
bv);
667 case Common_Types::t_int16:
668 return get_as_aux<Target, int16_t>(
bv);
669 case Common_Types::t_uint32:
670 return get_as_aux<Target, uint32_t>(
bv);
671 case Common_Types::t_uint64:
672 return get_as_aux<Target, uint64_t>(
bv);
673 case Common_Types::t_int64:
674 return get_as_aux<Target, int64_t>(
bv);
675 case Common_Types::t_double:
676 return get_as_aux<Target, double>(
bv);
677 case Common_Types::t_float:
678 return get_as_aux<Target, float>(
bv);
679 case Common_Types::t_long_double:
680 return get_as_aux<Target, long double>(
bv);
688 switch (get_common_type(
bv)) {
689 case Common_Types::t_int32:
691 case Common_Types::t_uint8:
693 case Common_Types::t_int8:
695 case Common_Types::t_uint16:
697 case Common_Types::t_int16:
699 case Common_Types::t_uint32:
701 case Common_Types::t_uint64:
703 case Common_Types::t_int64:
705 case Common_Types::t_double:
706 return to_string_aux<double>(
bv);
707 case Common_Types::t_float:
708 return to_string_aux<float>(
bv);
709 case Common_Types::t_long_double:
710 return to_string_aux<long double>(
bv);
719 if (inp_ ==
typeid(
bool))
895 return oper(t_oper, t_lhs, t_rhs);
900 return oper(t_oper, t_lhs);
934#pragma GCC diagnostic pop
937#ifdef CHAISCRIPT_MSVC
Represents any numeric type, generically. Used internally for generic operations between POD values.
Definition boxed_number.hpp:66
static bool not_equal(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:757
static Boxed_Value clone(const Boxed_Value &t_bv)
Definition boxed_number.hpp:524
static Boxed_Number assign(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:797
static const Boxed_Number bitwise_complement(const Boxed_Number &t_lhs)
Definition boxed_number.hpp:832
static Boxed_Number assign_bitwise_and(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:792
Boxed_Number & operator=(Boxed_Number &&)=default
Boxed_Number(Boxed_Value v)
Definition boxed_number.hpp:508
static const Boxed_Number shift_left(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:871
static Boxed_Number pre_increment(Boxed_Number t_lhs)
Definition boxed_number.hpp:767
static Boxed_Number pre_decrement(Boxed_Number t_lhs)
Definition boxed_number.hpp:762
static Boxed_Number assign_product(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:847
static bool greater_than(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:742
static bool less_than(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:737
static const Boxed_Number bitwise_or(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:842
static const Boxed_Number unary_plus(const Boxed_Number &t_lhs)
Definition boxed_number.hpp:777
static const Boxed_Number quotient(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:866
static const Boxed_Number unary_minus(const Boxed_Number &t_lhs)
Definition boxed_number.hpp:782
static const Boxed_Number sum(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:772
std::string to_string() const
Definition boxed_number.hpp:686
Target get_as() const
Definition boxed_number.hpp:656
static Boxed_Number assign_shift_left(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:817
static Boxed_Number assign_bitwise_xor(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:807
static void validate_boxed_number(const Boxed_Value &v)
Definition boxed_number.hpp:716
static Boxed_Number assign_difference(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:861
Boxed_Number(T t)
Definition boxed_number.hpp:518
static const Boxed_Number bitwise_xor(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:837
static const Boxed_Number shift_right(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:886
static Boxed_Number assign_remainder(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:812
static Boxed_Value do_oper(Operators::Opers t_oper, const Boxed_Value &t_lhs)
Definition boxed_number.hpp:898
static bool greater_than_equal(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:747
static const Boxed_Number bitwise_and(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:827
Target get_as_checked() const
Definition boxed_number.hpp:614
static const Boxed_Number remainder(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:881
static Boxed_Number assign_sum(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:857
Boxed_Number()
Definition boxed_number.hpp:503
static const Boxed_Number product(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:876
static Boxed_Number assign_bitwise_or(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:802
static void check_type()
Definition boxed_number.hpp:596
Boxed_Number(const Boxed_Number &)=default
static Boxed_Number assign_quotient(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:852
static Boxed_Number assign_shift_right(Boxed_Number t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:822
static Boxed_Value do_oper(Operators::Opers t_oper, const Boxed_Value &t_lhs, const Boxed_Value &t_rhs)
Definition boxed_number.hpp:893
static bool equals(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:732
static bool less_than_equal(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:752
static const Boxed_Number difference(const Boxed_Number &t_lhs, const Boxed_Number &t_rhs)
Definition boxed_number.hpp:787
static bool is_floating_point(const Boxed_Value &t_bv)
Definition boxed_number.hpp:528
Boxed_Number get_as(const Type_Info &inp_) const
Definition boxed_number.hpp:543
Boxed_Value bv
Definition boxed_number.hpp:905
Boxed_Number(Boxed_Number &&)=default
A wrapper for holding any valid C++ type. All types in ChaiScript are Boxed_Value objects.
Definition boxed_value.hpp:28
void * get_ptr() const noexcept
Definition boxed_value.hpp:311
const void * get_const_ptr() const noexcept
Definition boxed_value.hpp:316
bool is_const() const noexcept
Definition boxed_value.hpp:235
const Type_Info & get_type_info() const noexcept
Definition boxed_value.hpp:224
bool is_return_value() const noexcept
Definition boxed_value.hpp:296
Definition type_conversions.hpp:512
Definition type_conversions.hpp:321
Compile time deduced information about a type.
Definition type_info.hpp:34
constexpr bool bare_equal_type_info(const std::type_info &ti) const noexcept
Definition type_info.hpp:81
constexpr bool is_arithmetic() const noexcept
Definition type_info.hpp:89
Thrown in the event that an Any cannot be cast to the desired type.
Definition any.hpp:22
Classes and functions reserved for internal use. Items in this namespace are not supported.
Classes which may be thrown during error cases when ChaiScript is executing.
Definition bad_boxed_cast.hpp:27
Namespace chaiscript contains every API call that the average user will be concerned with.
decltype(auto) boxed_cast(const Boxed_Value &bv, const Type_Conversions_State *t_conversions=nullptr)
Function for extracting a value stored in a Boxed_Value object.
Definition boxed_cast.hpp:76
Boxed_Value const_var(const T &t)
Takes an object and returns an immutable Boxed_Value. If the object is a std::reference or pointer ty...
Definition boxed_value.hpp:461
Opers
Definition chaiscript_algebraic.hpp:23
@ shift_right
Definition chaiscript_algebraic.hpp:33
@ pre_increment
Definition chaiscript_algebraic.hpp:27
@ non_const_int_flag
Definition chaiscript_algebraic.hpp:29
@ sum
Definition chaiscript_algebraic.hpp:35
@ pre_decrement
Definition chaiscript_algebraic.hpp:27
@ less_than_equal
Definition chaiscript_algebraic.hpp:25
@ boolean_flag
Definition chaiscript_algebraic.hpp:24
@ bitwise_and
Definition chaiscript_algebraic.hpp:33
@ bitwise_xor
Definition chaiscript_algebraic.hpp:33
@ assign_bitwise_or
Definition chaiscript_algebraic.hpp:30
@ unary_minus
Definition chaiscript_algebraic.hpp:35
@ assign
Definition chaiscript_algebraic.hpp:27
@ const_flag
Definition chaiscript_algebraic.hpp:34
@ equals
Definition chaiscript_algebraic.hpp:25
@ assign_shift_left
Definition chaiscript_algebraic.hpp:30
@ bitwise_complement
Definition chaiscript_algebraic.hpp:33
@ assign_sum
Definition chaiscript_algebraic.hpp:27
@ assign_product
Definition chaiscript_algebraic.hpp:27
@ less_than
Definition chaiscript_algebraic.hpp:25
@ assign_remainder
Definition chaiscript_algebraic.hpp:31
@ quotient
Definition chaiscript_algebraic.hpp:35
@ assign_bitwise_xor
Definition chaiscript_algebraic.hpp:31
@ remainder
Definition chaiscript_algebraic.hpp:33
@ assign_bitwise_and
Definition chaiscript_algebraic.hpp:30
@ assign_difference
Definition chaiscript_algebraic.hpp:28
@ difference
Definition chaiscript_algebraic.hpp:35
@ not_equal
Definition chaiscript_algebraic.hpp:25
@ const_int_flag
Definition chaiscript_algebraic.hpp:32
@ assign_quotient
Definition chaiscript_algebraic.hpp:28
@ greater_than_equal
Definition chaiscript_algebraic.hpp:25
@ shift_left
Definition chaiscript_algebraic.hpp:33
@ unary_plus
Definition chaiscript_algebraic.hpp:35
@ non_const_flag
Definition chaiscript_algebraic.hpp:26
@ bitwise_or
Definition chaiscript_algebraic.hpp:33
@ product
Definition chaiscript_algebraic.hpp:35
@ assign_shift_right
Definition chaiscript_algebraic.hpp:30
@ greater_than
Definition chaiscript_algebraic.hpp:25
static Boxed_Number cast(const Boxed_Value &ob, const Type_Conversions_State *)
Definition boxed_number.hpp:914
The exposed Cast_Helper object that by default just calls the Cast_Helper_Inner.
Definition boxed_cast_helper.hpp:313
Definition boxed_number.hpp:33
~arithmetic_error() noexcept override=default
arithmetic_error(const arithmetic_error &)=default
arithmetic_error(const std::string &reason)
Definition boxed_number.hpp:34