... | ... |
@@ -1,8 +1,8 @@ |
1 | 1 |
Package: OncoSimulR |
2 | 2 |
Type: Package |
3 | 3 |
Title: Forward Genetic Simulation of Cancer Progression with Epistasis |
4 |
-Version: 4.1.3 |
|
5 |
-Date: 2023-02-20 |
|
4 |
+Version: 4.1.4 |
|
5 |
+Date: 2023-03-08 |
|
6 | 6 |
Authors@R: c( |
7 | 7 |
person("Ramon", "Diaz-Uriarte", role = c("aut", "cre"), |
8 | 8 |
email = "rdiaz02@gmail.com"), |
... | ... |
@@ -323,7 +323,7 @@ double Algo2_st(const spParamsP& spP, |
323 | 323 |
// pb = pB_f_st(pe, spP); |
324 | 324 |
// } |
325 | 325 |
|
326 |
- double rnb; // holder for neg. bino. So we can check. |
|
326 |
+ double rnb = -99.9999; // holder for neg. bino. So we can check. |
|
327 | 327 |
double retval; //So we can check |
328 | 328 |
|
329 | 329 |
if( (1.0 - pe/pm) > 1.0) { |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
****************************************************************** |
3 | 3 |
* C++ Mathematical Expression Toolkit Library * |
4 | 4 |
* * |
5 |
- * Author: Arash Partow (1999-2022) * |
|
5 |
+ * Author: Arash Partow (1999-2023) * |
|
6 | 6 |
* URL: https://www.partow.net/programming/exprtk/index.html * |
7 | 7 |
* * |
8 | 8 |
* Copyright notice: * |
... | ... |
@@ -38,7 +38,6 @@ |
38 | 38 |
#include <cassert> |
39 | 39 |
#include <cctype> |
40 | 40 |
#include <cmath> |
41 |
-#include <complex> |
|
42 | 41 |
#include <cstdio> |
43 | 42 |
#include <cstdlib> |
44 | 43 |
#include <cstring> |
... | ... |
@@ -298,7 +297,6 @@ namespace exprtk |
298 | 297 |
|
299 | 298 |
std::reverse(result.begin(), result.end()); |
300 | 299 |
|
301 |
- |
|
302 | 300 |
return result; |
303 | 301 |
} |
304 | 302 |
|
... | ... |
@@ -401,7 +399,7 @@ namespace exprtk |
401 | 399 |
{ |
402 | 400 |
public: |
403 | 401 |
|
404 |
- build_string(const std::size_t& initial_size = 64) |
|
402 |
+ explicit build_string(const std::size_t& initial_size = 64) |
|
405 | 403 |
{ |
406 | 404 |
data_.reserve(initial_size); |
407 | 405 |
} |
... | ... |
@@ -605,6 +603,8 @@ namespace exprtk |
605 | 603 |
const typename std::iterator_traits<Iterator>::value_type& zero_or_more, |
606 | 604 |
const typename std::iterator_traits<Iterator>::value_type& exactly_one ) |
607 | 605 |
{ |
606 |
+ typedef typename std::iterator_traits<Iterator>::value_type type; |
|
607 |
+ |
|
608 | 608 |
const Iterator null_itr(0); |
609 | 609 |
|
610 | 610 |
Iterator p_itr = pattern_begin; |
... | ... |
@@ -614,39 +614,45 @@ namespace exprtk |
614 | 614 |
|
615 | 615 |
for ( ; ; ) |
616 | 616 |
{ |
617 |
- const bool pvalid = p_itr != pattern_end; |
|
618 |
- const bool dvalid = d_itr != data_end; |
|
619 |
- |
|
620 |
- if (!pvalid && !dvalid) |
|
621 |
- break; |
|
622 |
- |
|
623 |
- if (pvalid) |
|
617 |
+ if (p_itr != pattern_end) |
|
624 | 618 |
{ |
625 |
- const typename std::iterator_traits<Iterator>::value_type c = *(p_itr); |
|
619 |
+ const type c = *(p_itr); |
|
626 | 620 |
|
627 |
- if (zero_or_more == c) |
|
621 |
+ if ((data_end != d_itr) && (Compare::cmp(c,*(d_itr)) || (exactly_one == c))) |
|
628 | 622 |
{ |
629 |
- np_itr = p_itr; |
|
630 |
- nd_itr = d_itr + 1; |
|
623 |
+ ++d_itr; |
|
631 | 624 |
++p_itr; |
632 | 625 |
continue; |
633 | 626 |
} |
634 |
- else if (dvalid && ((exactly_one == c) || Compare::cmp(c,*(d_itr)))) |
|
627 |
+ else if (zero_or_more == c) |
|
635 | 628 |
{ |
636 |
- ++p_itr; |
|
637 |
- ++d_itr; |
|
629 |
+ while ((pattern_end != p_itr) && (zero_or_more == *(p_itr))) |
|
630 |
+ { |
|
631 |
+ ++p_itr; |
|
632 |
+ } |
|
633 |
+ |
|
634 |
+ const type d = *(p_itr); |
|
635 |
+ |
|
636 |
+ while ((data_end != d_itr) && !(Compare::cmp(d,*(d_itr)) || (exactly_one == d))) |
|
637 |
+ { |
|
638 |
+ ++d_itr; |
|
639 |
+ } |
|
640 |
+ |
|
641 |
+ // set backtrack iterators |
|
642 |
+ np_itr = p_itr - 1; |
|
643 |
+ nd_itr = d_itr + 1; |
|
644 |
+ |
|
638 | 645 |
continue; |
639 | 646 |
} |
640 | 647 |
} |
648 |
+ else if (data_end == d_itr) |
|
649 |
+ return true; |
|
641 | 650 |
|
642 |
- if ((null_itr != nd_itr) && (nd_itr <= data_end)) |
|
643 |
- { |
|
644 |
- p_itr = np_itr; |
|
645 |
- d_itr = nd_itr; |
|
646 |
- continue; |
|
647 |
- } |
|
651 |
+ if ((data_end == d_itr) || (null_itr == nd_itr)) |
|
652 |
+ return false; |
|
648 | 653 |
|
649 |
- return false; |
|
654 |
+ p_itr = np_itr; |
|
655 |
+ d_itr = nd_itr; |
|
650 | 656 |
} |
651 | 657 |
|
652 | 658 |
return true; |
... | ... |
@@ -774,7 +780,6 @@ namespace exprtk |
774 | 780 |
{ |
775 | 781 |
struct unknown_type_tag { unknown_type_tag() {} }; |
776 | 782 |
struct real_type_tag { real_type_tag () {} }; |
777 |
- struct complex_type_tag { complex_type_tag() {} }; |
|
778 | 783 |
struct int_type_tag { int_type_tag () {} }; |
779 | 784 |
|
780 | 785 |
template <typename T> |
... | ... |
@@ -788,10 +793,6 @@ namespace exprtk |
788 | 793 |
template <> struct number_type<T> \ |
789 | 794 |
{ typedef real_type_tag type; number_type() {} }; \ |
790 | 795 |
|
791 |
- #define exprtk_register_complex_type_tag(T) \ |
|
792 |
- template <> struct number_type<std::complex<T> > \ |
|
793 |
- { typedef complex_type_tag type; number_type() {} }; \ |
|
794 |
- |
|
795 | 796 |
#define exprtk_register_int_type_tag(T) \ |
796 | 797 |
template <> struct number_type<T> \ |
797 | 798 |
{ typedef int_type_tag type; number_type() {} }; \ |
... | ... |
@@ -800,10 +801,6 @@ namespace exprtk |
800 | 801 |
exprtk_register_real_type_tag(long double) |
801 | 802 |
exprtk_register_real_type_tag(float ) |
802 | 803 |
|
803 |
- exprtk_register_complex_type_tag(double ) |
|
804 |
- exprtk_register_complex_type_tag(long double) |
|
805 |
- exprtk_register_complex_type_tag(float ) |
|
806 |
- |
|
807 | 804 |
exprtk_register_int_type_tag(short ) |
808 | 805 |
exprtk_register_int_type_tag(int ) |
809 | 806 |
exprtk_register_int_type_tag(_int64_t ) |
... | ... |
@@ -985,8 +982,8 @@ namespace exprtk |
985 | 982 |
else |
986 | 983 |
return (T(-0.5) * v + T(1)) * v; |
987 | 984 |
} |
988 |
- else |
|
989 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
985 |
+ |
|
986 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
990 | 987 |
} |
991 | 988 |
|
992 | 989 |
template <typename T> |
... | ... |
@@ -996,8 +993,8 @@ namespace exprtk |
996 | 993 |
{ |
997 | 994 |
return std::log(T(1) + v); |
998 | 995 |
} |
999 |
- else |
|
1000 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
996 |
+ |
|
997 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
1001 | 998 |
} |
1002 | 999 |
|
1003 | 1000 |
template <typename T> |
... | ... |
@@ -2063,6 +2060,11 @@ namespace exprtk |
2063 | 2060 |
details::_uint64_t iteration_count; |
2064 | 2061 |
}; |
2065 | 2062 |
|
2063 |
+ virtual bool check() |
|
2064 |
+ { |
|
2065 |
+ return true; |
|
2066 |
+ } |
|
2067 |
+ |
|
2066 | 2068 |
virtual void handle_runtime_violation(const violation_context&) |
2067 | 2069 |
{ |
2068 | 2070 |
throw std::runtime_error("ExprTk Loop run-time violation."); |
... | ... |
@@ -3318,7 +3320,7 @@ namespace exprtk |
3318 | 3320 |
ignore_set_.insert(symbol); |
3319 | 3321 |
} |
3320 | 3322 |
|
3321 |
- inline int insert(const lexer::token& t0, const lexer::token& t1, lexer::token& new_token) |
|
3323 |
+ inline int insert(const lexer::token& t0, const lexer::token& t1, lexer::token& new_token) exprtk_override |
|
3322 | 3324 |
{ |
3323 | 3325 |
bool match = false; |
3324 | 3326 |
new_token.type = lexer::token::e_mul; |
... | ... |
@@ -3365,7 +3367,7 @@ namespace exprtk |
3365 | 3367 |
std::set<std::string,details::ilesscompare> ignore_set_; |
3366 | 3368 |
}; |
3367 | 3369 |
|
3368 |
- class operator_joiner : public token_joiner |
|
3370 |
+ class operator_joiner exprtk_final : public token_joiner |
|
3369 | 3371 |
{ |
3370 | 3372 |
public: |
3371 | 3373 |
|
... | ... |
@@ -3373,7 +3375,7 @@ namespace exprtk |
3373 | 3375 |
: token_joiner(stride) |
3374 | 3376 |
{} |
3375 | 3377 |
|
3376 |
- inline bool join(const lexer::token& t0, const lexer::token& t1, lexer::token& t) |
|
3378 |
+ inline bool join(const lexer::token& t0, const lexer::token& t1, lexer::token& t) exprtk_override |
|
3377 | 3379 |
{ |
3378 | 3380 |
// ': =' --> ':=' |
3379 | 3381 |
if ((t0.type == lexer::token::e_colon) && (t1.type == lexer::token::e_eq)) |
... | ... |
@@ -3521,7 +3523,7 @@ namespace exprtk |
3521 | 3523 |
inline bool join(const lexer::token& t0, |
3522 | 3524 |
const lexer::token& t1, |
3523 | 3525 |
const lexer::token& t2, |
3524 |
- lexer::token& t) |
|
3526 |
+ lexer::token& t) exprtk_override |
|
3525 | 3527 |
{ |
3526 | 3528 |
// '[ * ]' --> '[*]' |
3527 | 3529 |
if ( |
... | ... |
@@ -3541,7 +3543,7 @@ namespace exprtk |
3541 | 3543 |
} |
3542 | 3544 |
}; |
3543 | 3545 |
|
3544 |
- class bracket_checker : public lexer::token_scanner |
|
3546 |
+ class bracket_checker exprtk_final : public lexer::token_scanner |
|
3545 | 3547 |
{ |
3546 | 3548 |
public: |
3547 | 3549 |
|
... | ... |
@@ -3626,7 +3628,8 @@ namespace exprtk |
3626 | 3628 |
lexer::token error_token_; |
3627 | 3629 |
}; |
3628 | 3630 |
|
3629 |
- class numeric_checker : public lexer::token_scanner |
|
3631 |
+ template <typename T> |
|
3632 |
+ class numeric_checker exprtk_final : public lexer::token_scanner |
|
3630 | 3633 |
{ |
3631 | 3634 |
public: |
3632 | 3635 |
|
... | ... |
@@ -3652,7 +3655,7 @@ namespace exprtk |
3652 | 3655 |
{ |
3653 | 3656 |
if (token::e_number == t.type) |
3654 | 3657 |
{ |
3655 |
- double v; |
|
3658 |
+ T v; |
|
3656 | 3659 |
|
3657 | 3660 |
if (!exprtk::details::string_to_real(t.value,v)) |
3658 | 3661 |
{ |
... | ... |
@@ -3689,7 +3692,7 @@ namespace exprtk |
3689 | 3692 |
std::vector<std::size_t> error_list_; |
3690 | 3693 |
}; |
3691 | 3694 |
|
3692 |
- class symbol_replacer : public lexer::token_modifier |
|
3695 |
+ class symbol_replacer exprtk_final : public lexer::token_modifier |
|
3693 | 3696 |
{ |
3694 | 3697 |
private: |
3695 | 3698 |
|
... | ... |
@@ -3756,7 +3759,7 @@ namespace exprtk |
3756 | 3759 |
replace_map_t replace_map_; |
3757 | 3760 |
}; |
3758 | 3761 |
|
3759 |
- class sequence_validator : public lexer::token_scanner |
|
3762 |
+ class sequence_validator exprtk_final : public lexer::token_scanner |
|
3760 | 3763 |
{ |
3761 | 3764 |
private: |
3762 | 3765 |
|
... | ... |
@@ -3928,7 +3931,7 @@ namespace exprtk |
3928 | 3931 |
std::vector<std::pair<lexer::token,lexer::token> > error_list_; |
3929 | 3932 |
}; |
3930 | 3933 |
|
3931 |
- class sequence_validator_3tokens : public lexer::token_scanner |
|
3934 |
+ class sequence_validator_3tokens exprtk_final : public lexer::token_scanner |
|
3932 | 3935 |
{ |
3933 | 3936 |
private: |
3934 | 3937 |
|
... | ... |
@@ -4762,12 +4765,12 @@ namespace exprtk |
4762 | 4765 |
inline void dump_ptr(const std::string& s, const void* ptr, const std::size_t size = 0) |
4763 | 4766 |
{ |
4764 | 4767 |
if (size) |
4765 |
- exprtk_debug(("%s - addr: %p\n",s.c_str(),ptr)); |
|
4766 |
- else |
|
4767 | 4768 |
exprtk_debug(("%s - addr: %p size: %d\n", |
4768 | 4769 |
s.c_str(), |
4769 | 4770 |
ptr, |
4770 | 4771 |
static_cast<unsigned int>(size))); |
4772 |
+ else |
|
4773 |
+ exprtk_debug(("%s - addr: %p\n",s.c_str(),ptr)); |
|
4771 | 4774 |
} |
4772 | 4775 |
#else |
4773 | 4776 |
inline void dump_ptr(const std::string&, const void*) {} |
... | ... |
@@ -4811,7 +4814,7 @@ namespace exprtk |
4811 | 4814 |
{ |
4812 | 4815 |
if (data && destruct && (0 == ref_count)) |
4813 | 4816 |
{ |
4814 |
- dump_ptr("~control_block() data",data); |
|
4817 |
+ dump_ptr("~vec_data_store::control_block() data",data); |
|
4815 | 4818 |
delete[] data; |
4816 | 4819 |
data = reinterpret_cast<data_t>(0); |
4817 | 4820 |
} |
... | ... |
@@ -5224,12 +5227,6 @@ namespace exprtk |
5224 | 5227 |
return std::not_equal_to<float>()(0.0f,v); |
5225 | 5228 |
} |
5226 | 5229 |
|
5227 |
- template <typename T> |
|
5228 |
- inline bool is_true(const std::complex<T>& v) |
|
5229 |
- { |
|
5230 |
- return std::not_equal_to<std::complex<T> >()(std::complex<T>(0),v); |
|
5231 |
- } |
|
5232 |
- |
|
5233 | 5230 |
template <typename T> |
5234 | 5231 |
inline bool is_true(const expression_node<T>* node) |
5235 | 5232 |
{ |
... | ... |
@@ -5342,7 +5339,11 @@ namespace exprtk |
5342 | 5339 |
template <typename T> |
5343 | 5340 |
inline bool is_constant_node(const expression_node<T>* node) |
5344 | 5341 |
{ |
5345 |
- return node && (details::expression_node<T>::e_constant == node->type()); |
|
5342 |
+ return node && |
|
5343 |
+ ( |
|
5344 |
+ details::expression_node<T>::e_constant == node->type() || |
|
5345 |
+ details::expression_node<T>::e_stringconst == node->type() |
|
5346 |
+ ); |
|
5346 | 5347 |
} |
5347 | 5348 |
|
5348 | 5349 |
template <typename T> |
... | ... |
@@ -5395,7 +5396,7 @@ namespace exprtk |
5395 | 5396 |
} |
5396 | 5397 |
|
5397 | 5398 |
template <typename T> |
5398 |
- inline bool branch_deletable(expression_node<T>* node) |
|
5399 |
+ inline bool branch_deletable(const expression_node<T>* node) |
|
5399 | 5400 |
{ |
5400 | 5401 |
return (0 != node) && |
5401 | 5402 |
!is_variable_node(node) && |
... | ... |
@@ -5403,7 +5404,7 @@ namespace exprtk |
5403 | 5404 |
} |
5404 | 5405 |
|
5405 | 5406 |
template <std::size_t N, typename T> |
5406 |
- inline bool all_nodes_valid(expression_node<T>* (&b)[N]) |
|
5407 |
+ inline bool all_nodes_valid(expression_node<T>* const (&b)[N]) |
|
5407 | 5408 |
{ |
5408 | 5409 |
for (std::size_t i = 0; i < N; ++i) |
5409 | 5410 |
{ |
... | ... |
@@ -5427,7 +5428,7 @@ namespace exprtk |
5427 | 5428 |
} |
5428 | 5429 |
|
5429 | 5430 |
template <std::size_t N, typename T> |
5430 |
- inline bool all_nodes_variables(expression_node<T>* (&b)[N]) |
|
5431 |
+ inline bool all_nodes_variables(expression_node<T>* const (&b)[N]) |
|
5431 | 5432 |
{ |
5432 | 5433 |
for (std::size_t i = 0; i < N; ++i) |
5433 | 5434 |
{ |
... | ... |
@@ -5443,7 +5444,7 @@ namespace exprtk |
5443 | 5444 |
template <typename T, |
5444 | 5445 |
typename Allocator, |
5445 | 5446 |
template <typename, typename> class Sequence> |
5446 |
- inline bool all_nodes_variables(Sequence<expression_node<T>*,Allocator>& b) |
|
5447 |
+ inline bool all_nodes_variables(const Sequence<expression_node<T>*,Allocator>& b) |
|
5447 | 5448 |
{ |
5448 | 5449 |
for (std::size_t i = 0; i < b.size(); ++i) |
5449 | 5450 |
{ |
... | ... |
@@ -5829,7 +5830,7 @@ namespace exprtk |
5829 | 5830 |
virtual std::size_t vector_size() const = 0; |
5830 | 5831 |
}; |
5831 | 5832 |
|
5832 |
- class array_vector_impl : public vector_holder_base |
|
5833 |
+ class array_vector_impl exprtk_final : public vector_holder_base |
|
5833 | 5834 |
{ |
5834 | 5835 |
public: |
5835 | 5836 |
|
... | ... |
@@ -5840,7 +5841,7 @@ namespace exprtk |
5840 | 5841 |
|
5841 | 5842 |
protected: |
5842 | 5843 |
|
5843 |
- value_ptr value_at(const std::size_t& index) const |
|
5844 |
+ value_ptr value_at(const std::size_t& index) const exprtk_override |
|
5844 | 5845 |
{ |
5845 | 5846 |
if (index < size_) |
5846 | 5847 |
return const_cast<const_value_ptr>(vec_ + index); |
... | ... |
@@ -5848,7 +5849,7 @@ namespace exprtk |
5848 | 5849 |
return const_value_ptr(0); |
5849 | 5850 |
} |
5850 | 5851 |
|
5851 |
- std::size_t vector_size() const |
|
5852 |
+ std::size_t vector_size() const exprtk_override |
|
5852 | 5853 |
{ |
5853 | 5854 |
return size_; |
5854 | 5855 |
} |
... | ... |
@@ -5864,24 +5865,24 @@ namespace exprtk |
5864 | 5865 |
|
5865 | 5866 |
template <typename Allocator, |
5866 | 5867 |
template <typename, typename> class Sequence> |
5867 |
- class sequence_vector_impl : public vector_holder_base |
|
5868 |
+ class sequence_vector_impl exprtk_final : public vector_holder_base |
|
5868 | 5869 |
{ |
5869 | 5870 |
public: |
5870 | 5871 |
|
5871 | 5872 |
typedef Sequence<Type,Allocator> sequence_t; |
5872 | 5873 |
|
5873 |
- sequence_vector_impl(sequence_t& seq) |
|
5874 |
+ explicit sequence_vector_impl(sequence_t& seq) |
|
5874 | 5875 |
: sequence_(seq) |
5875 | 5876 |
{} |
5876 | 5877 |
|
5877 | 5878 |
protected: |
5878 | 5879 |
|
5879 |
- value_ptr value_at(const std::size_t& index) const |
|
5880 |
+ value_ptr value_at(const std::size_t& index) const exprtk_override |
|
5880 | 5881 |
{ |
5881 | 5882 |
return (index < sequence_.size()) ? (&sequence_[index]) : const_value_ptr(0); |
5882 | 5883 |
} |
5883 | 5884 |
|
5884 |
- std::size_t vector_size() const |
|
5885 |
+ std::size_t vector_size() const exprtk_override |
|
5885 | 5886 |
{ |
5886 | 5887 |
return sequence_.size(); |
5887 | 5888 |
} |
... | ... |
@@ -5894,7 +5895,7 @@ namespace exprtk |
5894 | 5895 |
sequence_t& sequence_; |
5895 | 5896 |
}; |
5896 | 5897 |
|
5897 |
- class vector_view_impl : public vector_holder_base |
|
5898 |
+ class vector_view_impl exprtk_final : public vector_holder_base |
|
5898 | 5899 |
{ |
5899 | 5900 |
public: |
5900 | 5901 |
|
... | ... |
@@ -5904,24 +5905,24 @@ namespace exprtk |
5904 | 5905 |
: vec_view_(vec_view) |
5905 | 5906 |
{} |
5906 | 5907 |
|
5907 |
- void set_ref(value_ptr* ref) |
|
5908 |
+ void set_ref(value_ptr* ref) exprtk_override |
|
5908 | 5909 |
{ |
5909 | 5910 |
vec_view_.set_ref(ref); |
5910 | 5911 |
} |
5911 | 5912 |
|
5912 |
- virtual inline bool rebaseable() const |
|
5913 |
+ bool rebaseable() const exprtk_override |
|
5913 | 5914 |
{ |
5914 | 5915 |
return true; |
5915 | 5916 |
} |
5916 | 5917 |
|
5917 | 5918 |
protected: |
5918 | 5919 |
|
5919 |
- value_ptr value_at(const std::size_t& index) const |
|
5920 |
+ value_ptr value_at(const std::size_t& index) const exprtk_override |
|
5920 | 5921 |
{ |
5921 | 5922 |
return (index < vec_view_.size()) ? (&vec_view_[index]) : const_value_ptr(0); |
5922 | 5923 |
} |
5923 | 5924 |
|
5924 |
- std::size_t vector_size() const |
|
5925 |
+ std::size_t vector_size() const exprtk_override |
|
5925 | 5926 |
{ |
5926 | 5927 |
return vec_view_.size(); |
5927 | 5928 |
} |
... | ... |
@@ -5942,16 +5943,16 @@ namespace exprtk |
5942 | 5943 |
: vector_holder_base_(new(buffer)array_vector_impl(vec,vec_size)) |
5943 | 5944 |
{} |
5944 | 5945 |
|
5945 |
- vector_holder(const vds_t& vds) |
|
5946 |
+ explicit vector_holder(const vds_t& vds) |
|
5946 | 5947 |
: vector_holder_base_(new(buffer)array_vector_impl(vds.data(),vds.size())) |
5947 | 5948 |
{} |
5948 | 5949 |
|
5949 | 5950 |
template <typename Allocator> |
5950 |
- vector_holder(std::vector<Type,Allocator>& vec) |
|
5951 |
+ explicit vector_holder(std::vector<Type,Allocator>& vec) |
|
5951 | 5952 |
: vector_holder_base_(new(buffer)sequence_vector_impl<Allocator,std::vector>(vec)) |
5952 | 5953 |
{} |
5953 | 5954 |
|
5954 |
- vector_holder(exprtk::vector_view<Type>& vec) |
|
5955 |
+ explicit vector_holder(exprtk::vector_view<Type>& vec) |
|
5955 | 5956 |
: vector_holder_base_(new(buffer)vector_view_impl(vec)) |
5956 | 5957 |
{} |
5957 | 5958 |
|
... | ... |
@@ -6069,9 +6070,9 @@ namespace exprtk |
6069 | 6070 |
const bool result = details::numeric::is_nan(v); |
6070 | 6071 |
|
6071 | 6072 |
if (result) |
6072 |
- return (equality_) ? T(1) : T(0); |
|
6073 |
+ return equality_ ? T(1) : T(0); |
|
6073 | 6074 |
else |
6074 |
- return (equality_) ? T(0) : T(1); |
|
6075 |
+ return equality_ ? T(0) : T(1); |
|
6075 | 6076 |
} |
6076 | 6077 |
|
6077 | 6078 |
inline typename expression_node<T>::node_type type() const exprtk_override |
... | ... |
@@ -6255,9 +6256,7 @@ namespace exprtk |
6255 | 6256 |
inline T value() const exprtk_override |
6256 | 6257 |
{ |
6257 | 6258 |
assert(branch_.first); |
6258 |
- |
|
6259 | 6259 |
const T arg = branch_.first->value(); |
6260 |
- |
|
6261 | 6260 |
return numeric::process<T>(operation_,arg); |
6262 | 6261 |
} |
6263 | 6262 |
|
... | ... |
@@ -6286,12 +6285,12 @@ namespace exprtk |
6286 | 6285 |
expression_node<T>::ndb_t::collect(branch_, node_delete_list); |
6287 | 6286 |
} |
6288 | 6287 |
|
6289 |
- std::size_t node_depth() const exprtk_override exprtk_final |
|
6288 |
+ std::size_t node_depth() const exprtk_final |
|
6290 | 6289 |
{ |
6291 | 6290 |
return expression_node<T>::ndb_t::compute_node_depth(branch_); |
6292 | 6291 |
} |
6293 | 6292 |
|
6294 |
- protected: |
|
6293 |
+ private: |
|
6295 | 6294 |
|
6296 | 6295 |
operator_type operation_; |
6297 | 6296 |
branch_t branch_; |
... | ... |
@@ -6321,7 +6320,7 @@ namespace exprtk |
6321 | 6320 |
const T arg0 = branch_[0].first->value(); |
6322 | 6321 |
const T arg1 = branch_[1].first->value(); |
6323 | 6322 |
|
6324 |
- return numeric::process<T>(operation_,arg0,arg1); |
|
6323 |
+ return numeric::process<T>(operation_, arg0, arg1); |
|
6325 | 6324 |
} |
6326 | 6325 |
|
6327 | 6326 |
inline typename expression_node<T>::node_type type() const exprtk_override |
... | ... |
@@ -6349,12 +6348,12 @@ namespace exprtk |
6349 | 6348 |
expression_node<T>::ndb_t::template collect(branch_, node_delete_list); |
6350 | 6349 |
} |
6351 | 6350 |
|
6352 |
- std::size_t node_depth() const exprtk_override exprtk_final |
|
6351 |
+ std::size_t node_depth() const exprtk_final |
|
6353 | 6352 |
{ |
6354 | 6353 |
return expression_node<T>::ndb_t::template compute_node_depth<2>(branch_); |
6355 | 6354 |
} |
6356 | 6355 |
|
6357 |
- protected: |
|
6356 |
+ private: |
|
6358 | 6357 |
|
6359 | 6358 |
operator_type operation_; |
6360 | 6359 |
branch_t branch_[2]; |
... | ... |
@@ -6733,7 +6732,7 @@ namespace exprtk |
6733 | 6732 |
{ |
6734 | 6733 |
if ( |
6735 | 6734 |
(0 == loop_runtime_check_) || |
6736 |
- (++iteration_count_ <= max_loop_iterations_) |
|
6735 |
+ ((++iteration_count_ <= max_loop_iterations_) && loop_runtime_check_->check()) |
|
6737 | 6736 |
) |
6738 | 6737 |
{ |
6739 | 6738 |
return true; |
... | ... |
@@ -7408,8 +7407,8 @@ namespace exprtk |
7408 | 7407 |
|
7409 | 7408 |
return arg_list_[upper_bound].first->value(); |
7410 | 7409 |
} |
7411 |
- else |
|
7412 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
7410 |
+ |
|
7411 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
7413 | 7412 |
} |
7414 | 7413 |
|
7415 | 7414 |
inline typename expression_node<T>::node_type type() const exprtk_override exprtk_final |
... | ... |
@@ -8169,6 +8168,8 @@ namespace exprtk |
8169 | 8168 |
typedef vector_node <T>* vector_node_ptr; |
8170 | 8169 |
typedef vec_data_store <T> vds_t; |
8171 | 8170 |
|
8171 |
+ using binary_node<T>::branch; |
|
8172 |
+ |
|
8172 | 8173 |
swap_vecvec_node(expression_ptr branch0, |
8173 | 8174 |
expression_ptr branch1) |
8174 | 8175 |
: binary_node<T>(details::e_swap, branch0, branch1) |
... | ... |
@@ -8177,22 +8178,22 @@ namespace exprtk |
8177 | 8178 |
, vec_size_ (0) |
8178 | 8179 |
, initialised_ (false) |
8179 | 8180 |
{ |
8180 |
- if (is_ivector_node(binary_node<T>::branch_[0].first)) |
|
8181 |
+ if (is_ivector_node(branch(0))) |
|
8181 | 8182 |
{ |
8182 | 8183 |
vector_interface<T>* vi = reinterpret_cast<vector_interface<T>*>(0); |
8183 | 8184 |
|
8184 |
- if (0 != (vi = dynamic_cast<vector_interface<T>*>(binary_node<T>::branch_[0].first))) |
|
8185 |
+ if (0 != (vi = dynamic_cast<vector_interface<T>*>(branch(0)))) |
|
8185 | 8186 |
{ |
8186 | 8187 |
vec0_node_ptr_ = vi->vec(); |
8187 | 8188 |
vds() = vi->vds(); |
8188 | 8189 |
} |
8189 | 8190 |
} |
8190 | 8191 |
|
8191 |
- if (is_ivector_node(binary_node<T>::branch_[1].first)) |
|
8192 |
+ if (is_ivector_node(branch(1))) |
|
8192 | 8193 |
{ |
8193 | 8194 |
vector_interface<T>* vi = reinterpret_cast<vector_interface<T>*>(0); |
8194 | 8195 |
|
8195 |
- if (0 != (vi = dynamic_cast<vector_interface<T>*>(binary_node<T>::branch_[1].first))) |
|
8196 |
+ if (0 != (vi = dynamic_cast<vector_interface<T>*>(branch(1)))) |
|
8196 | 8197 |
{ |
8197 | 8198 |
vec1_node_ptr_ = vi->vec(); |
8198 | 8199 |
} |
... | ... |
@@ -8213,11 +8214,11 @@ namespace exprtk |
8213 | 8214 |
{ |
8214 | 8215 |
if (initialised_) |
8215 | 8216 |
{ |
8216 |
- assert(binary_node<T>::branch_[0].first); |
|
8217 |
- assert(binary_node<T>::branch_[1].first); |
|
8217 |
+ assert(branch(0)); |
|
8218 |
+ assert(branch(1)); |
|
8218 | 8219 |
|
8219 |
- binary_node<T>::branch_[0].first->value(); |
|
8220 |
- binary_node<T>::branch_[1].first->value(); |
|
8220 |
+ binary_node<T>::branch(0)->value(); |
|
8221 |
+ binary_node<T>::branch(1)->value(); |
|
8221 | 8222 |
|
8222 | 8223 |
T* vec0 = vec0_node_ptr_->vds().data(); |
8223 | 8224 |
T* vec1 = vec1_node_ptr_->vds().data(); |
... | ... |
@@ -8229,8 +8230,8 @@ namespace exprtk |
8229 | 8230 |
|
8230 | 8231 |
return vec1_node_ptr_->value(); |
8231 | 8232 |
} |
8232 |
- else |
|
8233 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
8233 |
+ |
|
8234 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
8234 | 8235 |
} |
8235 | 8236 |
|
8236 | 8237 |
vector_node_ptr vec() const exprtk_override |
... | ... |
@@ -8678,6 +8679,8 @@ namespace exprtk |
8678 | 8679 |
typedef expression_node <T>* expression_ptr; |
8679 | 8680 |
typedef string_base_node<T>* str_base_ptr; |
8680 | 8681 |
|
8682 |
+ using binary_node<T>::branch; |
|
8683 |
+ |
|
8681 | 8684 |
string_concat_node(const operator_type& opr, |
8682 | 8685 |
expression_ptr branch0, |
8683 | 8686 |
expression_ptr branch1) |
... | ... |
@@ -8694,27 +8697,27 @@ namespace exprtk |
8694 | 8697 |
range_.cache.first = range_.n0_c.second; |
8695 | 8698 |
range_.cache.second = range_.n1_c.second; |
8696 | 8699 |
|
8697 |
- if (is_generally_string_node(binary_node<T>::branch_[0].first)) |
|
8700 |
+ if (is_generally_string_node(branch(0))) |
|
8698 | 8701 |
{ |
8699 |
- str0_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[0].first); |
|
8702 |
+ str0_base_ptr_ = dynamic_cast<str_base_ptr>(branch(0)); |
|
8700 | 8703 |
|
8701 | 8704 |
if (0 == str0_base_ptr_) |
8702 | 8705 |
return; |
8703 | 8706 |
|
8704 |
- str0_range_ptr_ = dynamic_cast<irange_ptr>(binary_node<T>::branch_[0].first); |
|
8707 |
+ str0_range_ptr_ = dynamic_cast<irange_ptr>(branch(0)); |
|
8705 | 8708 |
|
8706 | 8709 |
if (0 == str0_range_ptr_) |
8707 | 8710 |
return; |
8708 | 8711 |
} |
8709 | 8712 |
|
8710 |
- if (is_generally_string_node(binary_node<T>::branch_[1].first)) |
|
8713 |
+ if (is_generally_string_node(branch(1))) |
|
8711 | 8714 |
{ |
8712 |
- str1_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[1].first); |
|
8715 |
+ str1_base_ptr_ = dynamic_cast<str_base_ptr>(branch(1)); |
|
8713 | 8716 |
|
8714 | 8717 |
if (0 == str1_base_ptr_) |
8715 | 8718 |
return; |
8716 | 8719 |
|
8717 |
- str1_range_ptr_ = dynamic_cast<irange_ptr>(binary_node<T>::branch_[1].first); |
|
8720 |
+ str1_range_ptr_ = dynamic_cast<irange_ptr>(branch(1)); |
|
8718 | 8721 |
|
8719 | 8722 |
if (0 == str1_range_ptr_) |
8720 | 8723 |
return; |
... | ... |
@@ -8732,11 +8735,11 @@ namespace exprtk |
8732 | 8735 |
{ |
8733 | 8736 |
if (initialised_) |
8734 | 8737 |
{ |
8735 |
- assert(binary_node<T>::branch_[0].first); |
|
8736 |
- assert(binary_node<T>::branch_[1].first); |
|
8738 |
+ assert(branch(0)); |
|
8739 |
+ assert(branch(1)); |
|
8737 | 8740 |
|
8738 |
- binary_node<T>::branch_[0].first->value(); |
|
8739 |
- binary_node<T>::branch_[1].first->value(); |
|
8741 |
+ branch(0)->value(); |
|
8742 |
+ branch(1)->value(); |
|
8740 | 8743 |
|
8741 | 8744 |
std::size_t str0_r0 = 0; |
8742 | 8745 |
std::size_t str0_r1 = 0; |
... | ... |
@@ -8823,20 +8826,22 @@ namespace exprtk |
8823 | 8826 |
typedef stringvar_node <T>* strvar_node_ptr; |
8824 | 8827 |
typedef string_base_node<T>* str_base_ptr; |
8825 | 8828 |
|
8829 |
+ using binary_node<T>::branch; |
|
8830 |
+ |
|
8826 | 8831 |
swap_string_node(expression_ptr branch0, expression_ptr branch1) |
8827 | 8832 |
: binary_node<T>(details::e_swap, branch0, branch1), |
8828 | 8833 |
initialised_(false), |
8829 | 8834 |
str0_node_ptr_(0), |
8830 | 8835 |
str1_node_ptr_(0) |
8831 | 8836 |
{ |
8832 |
- if (is_string_node(binary_node<T>::branch_[0].first)) |
|
8837 |
+ if (is_string_node(branch(0))) |
|
8833 | 8838 |
{ |
8834 |
- str0_node_ptr_ = static_cast<strvar_node_ptr>(binary_node<T>::branch_[0].first); |
|
8839 |
+ str0_node_ptr_ = static_cast<strvar_node_ptr>(branch(0)); |
|
8835 | 8840 |
} |
8836 | 8841 |
|
8837 |
- if (is_string_node(binary_node<T>::branch_[1].first)) |
|
8842 |
+ if (is_string_node(branch(1))) |
|
8838 | 8843 |
{ |
8839 |
- str1_node_ptr_ = static_cast<strvar_node_ptr>(binary_node<T>::branch_[1].first); |
|
8844 |
+ str1_node_ptr_ = static_cast<strvar_node_ptr>(branch(1)); |
|
8840 | 8845 |
} |
8841 | 8846 |
|
8842 | 8847 |
initialised_ = (str0_node_ptr_ && str1_node_ptr_); |
... | ... |
@@ -8848,11 +8853,11 @@ namespace exprtk |
8848 | 8853 |
{ |
8849 | 8854 |
if (initialised_) |
8850 | 8855 |
{ |
8851 |
- assert(binary_node<T>::branch_[0].first); |
|
8852 |
- assert(binary_node<T>::branch_[1].first); |
|
8856 |
+ assert(branch(0)); |
|
8857 |
+ assert(branch(1)); |
|
8853 | 8858 |
|
8854 |
- binary_node<T>::branch_[0].first->value(); |
|
8855 |
- binary_node<T>::branch_[1].first->value(); |
|
8859 |
+ branch(0)->value(); |
|
8860 |
+ branch(1)->value(); |
|
8856 | 8861 |
|
8857 | 8862 |
std::swap(str0_node_ptr_->ref(), str1_node_ptr_->ref()); |
8858 | 8863 |
} |
... | ... |
@@ -8909,6 +8914,8 @@ namespace exprtk |
8909 | 8914 |
typedef expression_node <T>* expression_ptr; |
8910 | 8915 |
typedef string_base_node<T>* str_base_ptr; |
8911 | 8916 |
|
8917 |
+ using binary_node<T>::branch; |
|
8918 |
+ |
|
8912 | 8919 |
swap_genstrings_node(expression_ptr branch0, |
8913 | 8920 |
expression_ptr branch1) |
8914 | 8921 |
: binary_node<T>(details::e_default, branch0, branch1) |
... | ... |
@@ -8918,14 +8925,14 @@ namespace exprtk |
8918 | 8925 |
, str1_range_ptr_(0) |
8919 | 8926 |
, initialised_(false) |
8920 | 8927 |
{ |
8921 |
- if (is_generally_string_node(binary_node<T>::branch_[0].first)) |
|
8928 |
+ if (is_generally_string_node(branch(0))) |
|
8922 | 8929 |
{ |
8923 |
- str0_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[0].first); |
|
8930 |
+ str0_base_ptr_ = dynamic_cast<str_base_ptr>(branch(0)); |
|
8924 | 8931 |
|
8925 | 8932 |
if (0 == str0_base_ptr_) |
8926 | 8933 |
return; |
8927 | 8934 |
|
8928 |
- irange_ptr range = dynamic_cast<irange_ptr>(binary_node<T>::branch_[0].first); |
|
8935 |
+ irange_ptr range = dynamic_cast<irange_ptr>(branch(0)); |
|
8929 | 8936 |
|
8930 | 8937 |
if (0 == range) |
8931 | 8938 |
return; |
... | ... |
@@ -8933,14 +8940,14 @@ namespace exprtk |
8933 | 8940 |
str0_range_ptr_ = &(range->range_ref()); |
8934 | 8941 |
} |
8935 | 8942 |
|
8936 |
- if (is_generally_string_node(binary_node<T>::branch_[1].first)) |
|
8943 |
+ if (is_generally_string_node(branch(1))) |
|
8937 | 8944 |
{ |
8938 |
- str1_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[1].first); |
|
8945 |
+ str1_base_ptr_ = dynamic_cast<str_base_ptr>(branch(1)); |
|
8939 | 8946 |
|
8940 | 8947 |
if (0 == str1_base_ptr_) |
8941 | 8948 |
return; |
8942 | 8949 |
|
8943 |
- irange_ptr range = dynamic_cast<irange_ptr>(binary_node<T>::branch_[1].first); |
|
8950 |
+ irange_ptr range = dynamic_cast<irange_ptr>(branch(1)); |
|
8944 | 8951 |
|
8945 | 8952 |
if (0 == range) |
8946 | 8953 |
return; |
... | ... |
@@ -8960,11 +8967,11 @@ namespace exprtk |
8960 | 8967 |
{ |
8961 | 8968 |
if (initialised_) |
8962 | 8969 |
{ |
8963 |
- assert(binary_node<T>::branch_[0].first); |
|
8964 |
- assert(binary_node<T>::branch_[1].first); |
|
8970 |
+ assert(branch(0)); |
|
8971 |
+ assert(branch(1)); |
|
8965 | 8972 |
|
8966 |
- binary_node<T>::branch_[0].first->value(); |
|
8967 |
- binary_node<T>::branch_[1].first->value(); |
|
8973 |
+ branch(0)->value(); |
|
8974 |
+ branch(1)->value(); |
|
8968 | 8975 |
|
8969 | 8976 |
std::size_t str0_r0 = 0; |
8970 | 8977 |
std::size_t str0_r1 = 0; |
... | ... |
@@ -9174,6 +9181,8 @@ namespace exprtk |
9174 | 9181 |
typedef stringvar_node <T>* strvar_node_ptr; |
9175 | 9182 |
typedef string_base_node<T>* str_base_ptr; |
9176 | 9183 |
|
9184 |
+ using binary_node<T>::branch; |
|
9185 |
+ |
|
9177 | 9186 |
assignment_string_node(const operator_type& opr, |
9178 | 9187 |
expression_ptr branch0, |
9179 | 9188 |
expression_ptr branch1) |
... | ... |
@@ -9184,21 +9193,20 @@ namespace exprtk |
9184 | 9193 |
, str0_node_ptr_ (0) |
9185 | 9194 |
, str1_range_ptr_(0) |
9186 | 9195 |
{ |
9187 |
- if (is_string_node(binary_node<T>::branch_[0].first)) |
|
9196 |
+ if (is_string_node(branch(0))) |
|
9188 | 9197 |
{ |
9189 |
- str0_node_ptr_ = static_cast<strvar_node_ptr>(binary_node<T>::branch_[0].first); |
|
9190 |
- |
|
9191 |
- str0_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[0].first); |
|
9198 |
+ str0_node_ptr_ = static_cast<strvar_node_ptr>(branch(0)); |
|
9199 |
+ str0_base_ptr_ = dynamic_cast<str_base_ptr>(branch(0)); |
|
9192 | 9200 |
} |
9193 | 9201 |
|
9194 |
- if (is_generally_string_node(binary_node<T>::branch_[1].first)) |
|
9202 |
+ if (is_generally_string_node(branch(1))) |
|
9195 | 9203 |
{ |
9196 |
- str1_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[1].first); |
|
9204 |
+ str1_base_ptr_ = dynamic_cast<str_base_ptr>(branch(1)); |
|
9197 | 9205 |
|
9198 | 9206 |
if (0 == str1_base_ptr_) |
9199 | 9207 |
return; |
9200 | 9208 |
|
9201 |
- irange_ptr range = dynamic_cast<irange_ptr>(binary_node<T>::branch_[1].first); |
|
9209 |
+ irange_ptr range = dynamic_cast<irange_ptr>(branch(1)); |
|
9202 | 9210 |
|
9203 | 9211 |
if (0 == range) |
9204 | 9212 |
return; |
... | ... |
@@ -9218,10 +9226,10 @@ namespace exprtk |
9218 | 9226 |
{ |
9219 | 9227 |
if (initialised_) |
9220 | 9228 |
{ |
9221 |
- assert(binary_node<T>::branch_[0].first); |
|
9222 |
- assert(binary_node<T>::branch_[1].first); |
|
9229 |
+ assert(branch(0)); |
|
9230 |
+ assert(branch(1)); |
|
9223 | 9231 |
|
9224 |
- binary_node<T>::branch_[1].first->value(); |
|
9232 |
+ branch(1)->value(); |
|
9225 | 9233 |
|
9226 | 9234 |
std::size_t r0 = 0; |
9227 | 9235 |
std::size_t r1 = 0; |
... | ... |
@@ -9234,7 +9242,7 @@ namespace exprtk |
9234 | 9242 |
str1_base_ptr_->base() + r0, |
9235 | 9243 |
(r1 - r0) + 1); |
9236 | 9244 |
|
9237 |
- binary_node<T>::branch_[0].first->value(); |
|
9245 |
+ branch(0)->value(); |
|
9238 | 9246 |
} |
9239 | 9247 |
} |
9240 | 9248 |
|
... | ... |
@@ -9297,6 +9305,8 @@ namespace exprtk |
9297 | 9305 |
typedef string_range_node<T>* str_rng_node_ptr; |
9298 | 9306 |
typedef string_base_node <T>* str_base_ptr; |
9299 | 9307 |
|
9308 |
+ using binary_node<T>::branch; |
|
9309 |
+ |
|
9300 | 9310 |
assignment_string_range_node(const operator_type& opr, |
9301 | 9311 |
expression_ptr branch0, |
9302 | 9312 |
expression_ptr branch1) |
... | ... |
@@ -9308,13 +9318,11 @@ namespace exprtk |
9308 | 9318 |
, str0_range_ptr_ (0) |
9309 | 9319 |
, str1_range_ptr_ (0) |
9310 | 9320 |
{ |
9311 |
- if (is_string_range_node(binary_node<T>::branch_[0].first)) |
|
9321 |
+ if (is_string_range_node(branch(0))) |
|
9312 | 9322 |
{ |
9313 |
- str0_rng_node_ptr_ = static_cast<str_rng_node_ptr>(binary_node<T>::branch_[0].first); |
|
9314 |
- |
|
9315 |
- str0_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[0].first); |
|
9316 |
- |
|
9317 |
- irange_ptr range = dynamic_cast<irange_ptr>(binary_node<T>::branch_[0].first); |
|
9323 |
+ str0_rng_node_ptr_ = static_cast<str_rng_node_ptr>(branch(0)); |
|
9324 |
+ str0_base_ptr_ = dynamic_cast<str_base_ptr>(branch(0)); |
|
9325 |
+ irange_ptr range = dynamic_cast<irange_ptr>(branch(0)); |
|
9318 | 9326 |
|
9319 | 9327 |
if (0 == range) |
9320 | 9328 |
return; |
... | ... |
@@ -9322,14 +9330,14 @@ namespace exprtk |
9322 | 9330 |
str0_range_ptr_ = &(range->range_ref()); |
9323 | 9331 |
} |
9324 | 9332 |
|
9325 |
- if (is_generally_string_node(binary_node<T>::branch_[1].first)) |
|
9333 |
+ if (is_generally_string_node(branch(1))) |
|
9326 | 9334 |
{ |
9327 |
- str1_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[1].first); |
|
9335 |
+ str1_base_ptr_ = dynamic_cast<str_base_ptr>(branch(1)); |
|
9328 | 9336 |
|
9329 | 9337 |
if (0 == str1_base_ptr_) |
9330 | 9338 |
return; |
9331 | 9339 |
|
9332 |
- irange_ptr range = dynamic_cast<irange_ptr>(binary_node<T>::branch_[1].first); |
|
9340 |
+ irange_ptr range = dynamic_cast<irange_ptr>(branch(1)); |
|
9333 | 9341 |
|
9334 | 9342 |
if (0 == range) |
9335 | 9343 |
return; |
... | ... |
@@ -9350,11 +9358,11 @@ namespace exprtk |
9350 | 9358 |
{ |
9351 | 9359 |
if (initialised_) |
9352 | 9360 |
{ |
9353 |
- assert(binary_node<T>::branch_[0].first); |
|
9354 |
- assert(binary_node<T>::branch_[1].first); |
|
9361 |
+ assert(branch(0)); |
|
9362 |
+ assert(branch(1)); |
|
9355 | 9363 |
|
9356 |
- binary_node<T>::branch_[0].first->value(); |
|
9357 |
- binary_node<T>::branch_[1].first->value(); |
|
9364 |
+ branch(0)->value(); |
|
9365 |
+ branch(1)->value(); |
|
9358 | 9366 |
|
9359 | 9367 |
std::size_t s0_r0 = 0; |
9360 | 9368 |
std::size_t s0_r1 = 0; |
... | ... |
@@ -9601,6 +9609,8 @@ namespace exprtk |
9601 | 9609 |
typedef expression_node <T>* expression_ptr; |
9602 | 9610 |
typedef string_base_node<T>* str_base_ptr; |
9603 | 9611 |
|
9612 |
+ using binary_node<T>::branch; |
|
9613 |
+ |
|
9604 | 9614 |
cons_conditional_str_node(expression_ptr condition, |
9605 | 9615 |
expression_ptr consequent) |
9606 | 9616 |
: binary_node<T>(details::e_default, consequent, condition) |
... | ... |
@@ -9616,14 +9626,14 @@ namespace exprtk |
9616 | 9626 |
range_.cache.first = range_.n0_c.second; |
9617 | 9627 |
range_.cache.second = range_.n1_c.second; |
9618 | 9628 |
|
9619 |
- if (is_generally_string_node(binary_node<T>::branch_[0].first)) |
|
9629 |
+ if (is_generally_string_node(branch(0))) |
|
9620 | 9630 |
{ |
9621 |
- str0_base_ptr_ = dynamic_cast<str_base_ptr>(binary_node<T>::branch_[0].first); |
|
9631 |
+ str0_base_ptr_ = dynamic_cast<str_base_ptr>(branch(0)); |
|
9622 | 9632 |
|
9623 | 9633 |
if (0 == str0_base_ptr_) |
9624 | 9634 |
return; |
9625 | 9635 |
|
9626 |
- str0_range_ptr_ = dynamic_cast<irange_ptr>(binary_node<T>::branch_[0].first); |
|
9636 |
+ str0_range_ptr_ = dynamic_cast<irange_ptr>(branch(0)); |
|
9627 | 9637 |
|
9628 | 9638 |
if (0 == str0_range_ptr_) |
9629 | 9639 |
return; |
... | ... |
@@ -10318,8 +10328,8 @@ namespace exprtk |
10318 | 10328 |
|
10319 | 10329 |
return VecFunction::process(ivec_ptr_); |
10320 | 10330 |
} |
10321 |
- else |
|
10322 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10331 |
+ |
|
10332 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10323 | 10333 |
} |
10324 | 10334 |
|
10325 | 10335 |
inline typename expression_node<T>::node_type type() const exprtk_override |
... | ... |
@@ -10349,6 +10359,7 @@ namespace exprtk |
10349 | 10359 |
public: |
10350 | 10360 |
|
10351 | 10361 |
typedef expression_node<T>* expression_ptr; |
10362 |
+ using binary_node<T>::branch; |
|
10352 | 10363 |
|
10353 | 10364 |
assignment_node(const operator_type& opr, |
10354 | 10365 |
expression_ptr branch0, |
... | ... |
@@ -10356,9 +10367,9 @@ namespace exprtk |
10356 | 10367 |
: binary_node<T>(opr, branch0, branch1) |
10357 | 10368 |
, var_node_ptr_(0) |
10358 | 10369 |
{ |
10359 |
- if (is_variable_node(binary_node<T>::branch_[0].first)) |
|
10370 |
+ if (is_variable_node(branch(0))) |
|
10360 | 10371 |
{ |
10361 |
- var_node_ptr_ = static_cast<variable_node<T>*>(binary_node<T>::branch_[0].first); |
|
10372 |
+ var_node_ptr_ = static_cast<variable_node<T>*>(branch(0)); |
|
10362 | 10373 |
} |
10363 | 10374 |
} |
10364 | 10375 |
|
... | ... |
@@ -10366,16 +10377,15 @@ namespace exprtk |
10366 | 10377 |
{ |
10367 | 10378 |
if (var_node_ptr_) |
10368 | 10379 |
{ |
10369 |
- assert(binary_node<T>::branch_[1].first); |
|
10380 |
+ assert(branch(1)); |
|
10370 | 10381 |
|
10371 | 10382 |
T& result = var_node_ptr_->ref(); |
10372 |
- |
|
10373 |
- result = binary_node<T>::branch_[1].first->value(); |
|
10383 |
+ result = branch(1)->value(); |
|
10374 | 10384 |
|
10375 | 10385 |
return result; |
10376 | 10386 |
} |
10377 |
- else |
|
10378 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10387 |
+ |
|
10388 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10379 | 10389 |
} |
10380 | 10390 |
|
10381 | 10391 |
private: |
... | ... |
@@ -10389,6 +10399,7 @@ namespace exprtk |
10389 | 10399 |
public: |
10390 | 10400 |
|
10391 | 10401 |
typedef expression_node<T>* expression_ptr; |
10402 |
+ using binary_node<T>::branch; |
|
10392 | 10403 |
|
10393 | 10404 |
assignment_vec_elem_node(const operator_type& opr, |
10394 | 10405 |
expression_ptr branch0, |
... | ... |
@@ -10396,9 +10407,9 @@ namespace exprtk |
10396 | 10407 |
: binary_node<T>(opr, branch0, branch1) |
10397 | 10408 |
, vec_node_ptr_(0) |
10398 | 10409 |
{ |
10399 |
- if (is_vector_elem_node(binary_node<T>::branch_[0].first)) |
|
10410 |
+ if (is_vector_elem_node(branch(0))) |
|
10400 | 10411 |
{ |
10401 |
- vec_node_ptr_ = static_cast<vector_elem_node<T>*>(binary_node<T>::branch_[0].first); |
|
10412 |
+ vec_node_ptr_ = static_cast<vector_elem_node<T>*>(branch(0)); |
|
10402 | 10413 |
} |
10403 | 10414 |
} |
10404 | 10415 |
|
... | ... |
@@ -10406,16 +10417,15 @@ namespace exprtk |
10406 | 10417 |
{ |
10407 | 10418 |
if (vec_node_ptr_) |
10408 | 10419 |
{ |
10409 |
- assert(binary_node<T>::branch_[1].first); |
|
10420 |
+ assert(branch(1)); |
|
10410 | 10421 |
|
10411 | 10422 |
T& result = vec_node_ptr_->ref(); |
10412 |
- |
|
10413 |
- result = binary_node<T>::branch_[1].first->value(); |
|
10423 |
+ result = branch(1)->value(); |
|
10414 | 10424 |
|
10415 | 10425 |
return result; |
10416 | 10426 |
} |
10417 |
- else |
|
10418 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10427 |
+ |
|
10428 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10419 | 10429 |
} |
10420 | 10430 |
|
10421 | 10431 |
private: |
... | ... |
@@ -10429,6 +10439,7 @@ namespace exprtk |
10429 | 10439 |
public: |
10430 | 10440 |
|
10431 | 10441 |
typedef expression_node<T>* expression_ptr; |
10442 |
+ using expression_node<T>::branch; |
|
10432 | 10443 |
|
10433 | 10444 |
assignment_rebasevec_elem_node(const operator_type& opr, |
10434 | 10445 |
expression_ptr branch0, |
... | ... |
@@ -10436,9 +10447,9 @@ namespace exprtk |
10436 | 10447 |
: binary_node<T>(opr, branch0, branch1) |
10437 | 10448 |
, rbvec_node_ptr_(0) |
10438 | 10449 |
{ |
10439 |
- if (is_rebasevector_elem_node(binary_node<T>::branch_[0].first)) |
|
10450 |
+ if (is_rebasevector_elem_node(branch(0))) |
|
10440 | 10451 |
{ |
10441 |
- rbvec_node_ptr_ = static_cast<rebasevector_elem_node<T>*>(binary_node<T>::branch_[0].first); |
|
10452 |
+ rbvec_node_ptr_ = static_cast<rebasevector_elem_node<T>*>(branch(0)); |
|
10442 | 10453 |
} |
10443 | 10454 |
} |
10444 | 10455 |
|
... | ... |
@@ -10446,16 +10457,16 @@ namespace exprtk |
10446 | 10457 |
{ |
10447 | 10458 |
if (rbvec_node_ptr_) |
10448 | 10459 |
{ |
10449 |
- assert(binary_node<T>::branch_[1].first); |
|
10460 |
+ assert(branch(1)); |
|
10450 | 10461 |
|
10451 | 10462 |
T& result = rbvec_node_ptr_->ref(); |
10452 | 10463 |
|
10453 |
- result = binary_node<T>::branch_[1].first->value(); |
|
10464 |
+ result = branch(1)->value(); |
|
10454 | 10465 |
|
10455 | 10466 |
return result; |
10456 | 10467 |
} |
10457 |
- else |
|
10458 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10468 |
+ |
|
10469 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10459 | 10470 |
} |
10460 | 10471 |
|
10461 | 10472 |
private: |
... | ... |
@@ -10469,6 +10480,7 @@ namespace exprtk |
10469 | 10480 |
public: |
10470 | 10481 |
|
10471 | 10482 |
typedef expression_node<T>* expression_ptr; |
10483 |
+ using binary_node<T>::branch; |
|
10472 | 10484 |
|
10473 | 10485 |
assignment_rebasevec_celem_node(const operator_type& opr, |
10474 | 10486 |
expression_ptr branch0, |
... | ... |
@@ -10476,9 +10488,9 @@ namespace exprtk |
10476 | 10488 |
: binary_node<T>(opr, branch0, branch1) |
10477 | 10489 |
, rbvec_node_ptr_(0) |
10478 | 10490 |
{ |
10479 |
- if (is_rebasevector_celem_node(binary_node<T>::branch_[0].first)) |
|
10491 |
+ if (is_rebasevector_celem_node(branch(0))) |
|
10480 | 10492 |
{ |
10481 |
- rbvec_node_ptr_ = static_cast<rebasevector_celem_node<T>*>(binary_node<T>::branch_[0].first); |
|
10493 |
+ rbvec_node_ptr_ = static_cast<rebasevector_celem_node<T>*>(branch(0)); |
|
10482 | 10494 |
} |
10483 | 10495 |
} |
10484 | 10496 |
|
... | ... |
@@ -10486,16 +10498,15 @@ namespace exprtk |
10486 | 10498 |
{ |
10487 | 10499 |
if (rbvec_node_ptr_) |
10488 | 10500 |
{ |
10489 |
- assert(binary_node<T>::branch_[1].first); |
|
10501 |
+ assert(branch(1)); |
|
10490 | 10502 |
|
10491 | 10503 |
T& result = rbvec_node_ptr_->ref(); |
10492 |
- |
|
10493 |
- result = binary_node<T>::branch_[1].first->value(); |
|
10504 |
+ result = branch(1)->value(); |
|
10494 | 10505 |
|
10495 | 10506 |
return result; |
10496 | 10507 |
} |
10497 |
- else |
|
10498 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10508 |
+ |
|
10509 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10499 | 10510 |
} |
10500 | 10511 |
|
10501 | 10512 |
private: |
... | ... |
@@ -10514,15 +10525,17 @@ namespace exprtk |
10514 | 10525 |
typedef vector_node<T>* vector_node_ptr; |
10515 | 10526 |
typedef vec_data_store<T> vds_t; |
10516 | 10527 |
|
10528 |
+ using binary_node<T>::branch; |
|
10529 |
+ |
|
10517 | 10530 |
assignment_vec_node(const operator_type& opr, |
10518 | 10531 |
expression_ptr branch0, |
10519 | 10532 |
expression_ptr branch1) |
10520 | 10533 |
: binary_node<T>(opr, branch0, branch1) |
10521 | 10534 |
, vec_node_ptr_(0) |
10522 | 10535 |
{ |
10523 |
- if (is_vector_node(binary_node<T>::branch_[0].first)) |
|
10536 |
+ if (is_vector_node(branch(0))) |
|
10524 | 10537 |
{ |
10525 |
- vec_node_ptr_ = static_cast<vector_node<T>*>(binary_node<T>::branch_[0].first); |
|
10538 |
+ vec_node_ptr_ = static_cast<vector_node<T>*>(branch(0)); |
|
10526 | 10539 |
vds() = vec_node_ptr_->vds(); |
10527 | 10540 |
} |
10528 | 10541 |
} |
... | ... |
@@ -10531,9 +10544,9 @@ namespace exprtk |
10531 | 10544 |
{ |
10532 | 10545 |
if (vec_node_ptr_) |
10533 | 10546 |
{ |
10534 |
- assert(binary_node<T>::branch_[1].first); |
|
10547 |
+ assert(branch(1)); |
|
10535 | 10548 |
|
10536 |
- const T v = binary_node<T>::branch_[1].first->value(); |
|
10549 |
+ const T v = branch(1)->value(); |
|
10537 | 10550 |
|
10538 | 10551 |
T* vec = vds().data(); |
10539 | 10552 |
|
... | ... |
@@ -10583,8 +10596,8 @@ namespace exprtk |
10583 | 10596 |
|
10584 | 10597 |
return vec_node_ptr_->value(); |
10585 | 10598 |
} |
10586 |
- else |
|
10587 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10599 |
+ |
|
10600 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10588 | 10601 |
} |
10589 | 10602 |
|
10590 | 10603 |
vector_node_ptr vec() const exprtk_override |
... | ... |
@@ -10634,6 +10647,8 @@ namespace exprtk |
10634 | 10647 |
typedef vector_node<T>* vector_node_ptr; |
10635 | 10648 |
typedef vec_data_store<T> vds_t; |
10636 | 10649 |
|
10650 |
+ using binary_node<T>::branch; |
|
10651 |
+ |
|
10637 | 10652 |
assignment_vecvec_node(const operator_type& opr, |
10638 | 10653 |
expression_ptr branch0, |
10639 | 10654 |
expression_ptr branch1) |
... | ... |
@@ -10643,22 +10658,22 @@ namespace exprtk |
10643 | 10658 |
, initialised_(false) |
10644 | 10659 |
, src_is_ivec_(false) |
10645 | 10660 |
{ |
10646 |
- if (is_vector_node(binary_node<T>::branch_[0].first)) |
|
10661 |
+ if (is_vector_node(branch(0))) |
|
10647 | 10662 |
{ |
10648 |
- vec0_node_ptr_ = static_cast<vector_node<T>*>(binary_node<T>::branch_[0].first); |
|
10663 |
+ vec0_node_ptr_ = static_cast<vector_node<T>*>(branch(0)); |
|
10649 | 10664 |
vds() = vec0_node_ptr_->vds(); |
10650 | 10665 |
} |
10651 | 10666 |
|
10652 |
- if (is_vector_node(binary_node<T>::branch_[1].first)) |
|
10667 |
+ if (is_vector_node(branch(1))) |
|
10653 | 10668 |
{ |
10654 |
- vec1_node_ptr_ = static_cast<vector_node<T>*>(binary_node<T>::branch_[1].first); |
|
10669 |
+ vec1_node_ptr_ = static_cast<vector_node<T>*>(branch(1)); |
|
10655 | 10670 |
vds_t::match_sizes(vds(),vec1_node_ptr_->vds()); |
10656 | 10671 |
} |
10657 |
- else if (is_ivector_node(binary_node<T>::branch_[1].first)) |
|
10672 |
+ else if (is_ivector_node(branch(1))) |
|
10658 | 10673 |
{ |
10659 | 10674 |
vector_interface<T>* vi = reinterpret_cast<vector_interface<T>*>(0); |
10660 | 10675 |
|
10661 |
- if (0 != (vi = dynamic_cast<vector_interface<T>*>(binary_node<T>::branch_[1].first))) |
|
10676 |
+ if (0 != (vi = dynamic_cast<vector_interface<T>*>(branch(1)))) |
|
10662 | 10677 |
{ |
10663 | 10678 |
vec1_node_ptr_ = vi->vec(); |
10664 | 10679 |
|
... | ... |
@@ -10681,9 +10696,9 @@ namespace exprtk |
10681 | 10696 |
{ |
10682 | 10697 |
if (initialised_) |
10683 | 10698 |
{ |
10684 |
- assert(binary_node<T>::branch_[1].first); |
|
10699 |
+ assert(branch(1)); |
|
10685 | 10700 |
|
10686 |
- binary_node<T>::branch_[1].first->value(); |
|
10701 |
+ branch(1)->value(); |
|
10687 | 10702 |
|
10688 | 10703 |
if (src_is_ivec_) |
10689 | 10704 |
return vec0_node_ptr_->value(); |
... | ... |
@@ -10738,8 +10753,8 @@ namespace exprtk |
10738 | 10753 |
|
10739 | 10754 |
return vec0_node_ptr_->value(); |
10740 | 10755 |
} |
10741 |
- else |
|
10742 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10756 |
+ |
|
10757 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10743 | 10758 |
} |
10744 | 10759 |
|
10745 | 10760 |
vector_node_ptr vec() exprtk_override |
... | ... |
@@ -10787,6 +10802,7 @@ namespace exprtk |
10787 | 10802 |
public: |
10788 | 10803 |
|
10789 | 10804 |
typedef expression_node<T>* expression_ptr; |
10805 |
+ using binary_node<T>::branch; |
|
10790 | 10806 |
|
10791 | 10807 |
assignment_op_node(const operator_type& opr, |
10792 | 10808 |
expression_ptr branch0, |
... | ... |
@@ -10794,9 +10810,9 @@ namespace exprtk |
10794 | 10810 |
: binary_node<T>(opr, branch0, branch1) |
10795 | 10811 |
, var_node_ptr_(0) |
10796 | 10812 |
{ |
10797 |
- if (is_variable_node(binary_node<T>::branch_[0].first)) |
|
10813 |
+ if (is_variable_node(branch(0))) |
|
10798 | 10814 |
{ |
10799 |
- var_node_ptr_ = static_cast<variable_node<T>*>(binary_node<T>::branch_[0].first); |
|
10815 |
+ var_node_ptr_ = static_cast<variable_node<T>*>(branch(0)); |
|
10800 | 10816 |
} |
10801 | 10817 |
} |
10802 | 10818 |
|
... | ... |
@@ -10804,15 +10820,15 @@ namespace exprtk |
10804 | 10820 |
{ |
10805 | 10821 |
if (var_node_ptr_) |
10806 | 10822 |
{ |
10807 |
- assert(binary_node<T>::branch_[1].first); |
|
10823 |
+ assert(branch(1)); |
|
10808 | 10824 |
|
10809 | 10825 |
T& v = var_node_ptr_->ref(); |
10810 |
- v = Operation::process(v,binary_node<T>::branch_[1].first->value()); |
|
10826 |
+ v = Operation::process(v,branch(1)->value()); |
|
10811 | 10827 |
|
10812 | 10828 |
return v; |
10813 | 10829 |
} |
10814 |
- else |
|
10815 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10830 |
+ |
|
10831 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10816 | 10832 |
} |
10817 | 10833 |
|
10818 | 10834 |
private: |
... | ... |
@@ -10826,6 +10842,7 @@ namespace exprtk |
10826 | 10842 |
public: |
10827 | 10843 |
|
10828 | 10844 |
typedef expression_node<T>* expression_ptr; |
10845 |
+ using binary_node<T>::branch; |
|
10829 | 10846 |
|
10830 | 10847 |
assignment_vec_elem_op_node(const operator_type& opr, |
10831 | 10848 |
expression_ptr branch0, |
... | ... |
@@ -10833,9 +10850,9 @@ namespace exprtk |
10833 | 10850 |
: binary_node<T>(opr, branch0, branch1) |
10834 | 10851 |
, vec_node_ptr_(0) |
10835 | 10852 |
{ |
10836 |
- if (is_vector_elem_node(binary_node<T>::branch_[0].first)) |
|
10853 |
+ if (is_vector_elem_node(branch(0))) |
|
10837 | 10854 |
{ |
10838 |
- vec_node_ptr_ = static_cast<vector_elem_node<T>*>(binary_node<T>::branch_[0].first); |
|
10855 |
+ vec_node_ptr_ = static_cast<vector_elem_node<T>*>(branch(0)); |
|
10839 | 10856 |
} |
10840 | 10857 |
} |
10841 | 10858 |
|
... | ... |
@@ -10843,15 +10860,15 @@ namespace exprtk |
10843 | 10860 |
{ |
10844 | 10861 |
if (vec_node_ptr_) |
10845 | 10862 |
{ |
10846 |
- assert(binary_node<T>::branch_[1].first); |
|
10863 |
+ assert(branch(1)); |
|
10847 | 10864 |
|
10848 | 10865 |
T& v = vec_node_ptr_->ref(); |
10849 |
- v = Operation::process(v,binary_node<T>::branch_[1].first->value()); |
|
10866 |
+ v = Operation::process(v,branch(1)->value()); |
|
10850 | 10867 |
|
10851 | 10868 |
return v; |
10852 | 10869 |
} |
10853 |
- else |
|
10854 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10870 |
+ |
|
10871 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10855 | 10872 |
} |
10856 | 10873 |
|
10857 | 10874 |
private: |
... | ... |
@@ -10865,6 +10882,7 @@ namespace exprtk |
10865 | 10882 |
public: |
10866 | 10883 |
|
10867 | 10884 |
typedef expression_node<T>* expression_ptr; |
10885 |
+ using binary_node<T>::branch; |
|
10868 | 10886 |
|
10869 | 10887 |
assignment_rebasevec_elem_op_node(const operator_type& opr, |
10870 | 10888 |
expression_ptr branch0, |
... | ... |
@@ -10872,9 +10890,9 @@ namespace exprtk |
10872 | 10890 |
: binary_node<T>(opr, branch0, branch1) |
10873 | 10891 |
, rbvec_node_ptr_(0) |
10874 | 10892 |
{ |
10875 |
- if (is_rebasevector_elem_node(binary_node<T>::branch_[0].first)) |
|
10893 |
+ if (is_rebasevector_elem_node(branch(0))) |
|
10876 | 10894 |
{ |
10877 |
- rbvec_node_ptr_ = static_cast<rebasevector_elem_node<T>*>(binary_node<T>::branch_[0].first); |
|
10895 |
+ rbvec_node_ptr_ = static_cast<rebasevector_elem_node<T>*>(branch(0)); |
|
10878 | 10896 |
} |
10879 | 10897 |
} |
10880 | 10898 |
|
... | ... |
@@ -10882,15 +10900,15 @@ namespace exprtk |
10882 | 10900 |
{ |
10883 | 10901 |
if (rbvec_node_ptr_) |
10884 | 10902 |
{ |
10885 |
- assert(binary_node<T>::branch_[1].first); |
|
10903 |
+ assert(branch(1)); |
|
10886 | 10904 |
|
10887 | 10905 |
T& v = rbvec_node_ptr_->ref(); |
10888 |
- v = Operation::process(v,binary_node<T>::branch_[1].first->value()); |
|
10906 |
+ v = Operation::process(v,branch(1)->value()); |
|
10889 | 10907 |
|
10890 | 10908 |
return v; |
10891 | 10909 |
} |
10892 |
- else |
|
10893 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10910 |
+ |
|
10911 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10894 | 10912 |
} |
10895 | 10913 |
|
10896 | 10914 |
private: |
... | ... |
@@ -10904,6 +10922,7 @@ namespace exprtk |
10904 | 10922 |
public: |
10905 | 10923 |
|
10906 | 10924 |
typedef expression_node<T>* expression_ptr; |
10925 |
+ using binary_node<T>::branch; |
|
10907 | 10926 |
|
10908 | 10927 |
assignment_rebasevec_celem_op_node(const operator_type& opr, |
10909 | 10928 |
expression_ptr branch0, |
... | ... |
@@ -10911,9 +10930,9 @@ namespace exprtk |
10911 | 10930 |
: binary_node<T>(opr, branch0, branch1) |
10912 | 10931 |
, rbvec_node_ptr_(0) |
10913 | 10932 |
{ |
10914 |
- if (is_rebasevector_celem_node(binary_node<T>::branch_[0].first)) |
|
10933 |
+ if (is_rebasevector_celem_node(branch(0))) |
|
10915 | 10934 |
{ |
10916 |
- rbvec_node_ptr_ = static_cast<rebasevector_celem_node<T>*>(binary_node<T>::branch_[0].first); |
|
10935 |
+ rbvec_node_ptr_ = static_cast<rebasevector_celem_node<T>*>(branch(0)); |
|
10917 | 10936 |
} |
10918 | 10937 |
} |
10919 | 10938 |
|
... | ... |
@@ -10921,15 +10940,15 @@ namespace exprtk |
10921 | 10940 |
{ |
10922 | 10941 |
if (rbvec_node_ptr_) |
10923 | 10942 |
{ |
10924 |
- assert(binary_node<T>::branch_[1].first); |
|
10943 |
+ assert(branch(1)); |
|
10925 | 10944 |
|
10926 | 10945 |
T& v = rbvec_node_ptr_->ref(); |
10927 |
- v = Operation::process(v,binary_node<T>::branch_[1].first->value()); |
|
10946 |
+ v = Operation::process(v,branch(1)->value()); |
|
10928 | 10947 |
|
10929 | 10948 |
return v; |
10930 | 10949 |
} |
10931 |
- else |
|
10932 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
10950 |
+ |
|
10951 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
10933 | 10952 |
} |
10934 | 10953 |
|
10935 | 10954 |
private: |
... | ... |
@@ -10948,15 +10967,17 @@ namespace exprtk |
10948 | 10967 |
typedef vector_node<T>* vector_node_ptr; |
10949 | 10968 |
typedef vec_data_store<T> vds_t; |
10950 | 10969 |
|
10970 |
+ using binary_node<T>::branch; |
|
10971 |
+ |
|
10951 | 10972 |
assignment_vec_op_node(const operator_type& opr, |
10952 | 10973 |
expression_ptr branch0, |
10953 | 10974 |
expression_ptr branch1) |
10954 | 10975 |
: binary_node<T>(opr, branch0, branch1) |
10955 | 10976 |
, vec_node_ptr_(0) |
10956 | 10977 |
{ |
10957 |
- if (is_vector_node(binary_node<T>::branch_[0].first)) |
|
10978 |
+ if (is_vector_node(branch(0))) |
|
10958 | 10979 |
{ |
10959 |
- vec_node_ptr_ = static_cast<vector_node<T>*>(binary_node<T>::branch_[0].first); |
|
10980 |
+ vec_node_ptr_ = static_cast<vector_node<T>*>(branch(0)); |
|
10960 | 10981 |
vds() = vec_node_ptr_->vds(); |
10961 | 10982 |
} |
10962 | 10983 |
} |
... | ... |
@@ -10965,9 +10986,9 @@ namespace exprtk |
10965 | 10986 |
{ |
10966 | 10987 |
if (vec_node_ptr_) |
10967 | 10988 |
{ |
10968 |
- assert(binary_node<T>::branch_[1].first); |
|
10989 |
+ assert(branch(1)); |
|
10969 | 10990 |
|
10970 |
- const T v = binary_node<T>::branch_[1].first->value(); |
|
10991 |
+ const T v = branch(1)->value(); |
|
10971 | 10992 |
|
10972 | 10993 |
T* vec = vds().data(); |
10973 | 10994 |
|
... | ... |
@@ -11017,8 +11038,8 @@ namespace exprtk |
11017 | 11038 |
|
11018 | 11039 |
return vec_node_ptr_->value(); |
11019 | 11040 |
} |
11020 |
- else |
|
11021 |
- return std::numeric_limits<T>::quiet_NaN(); |
|
11041 |
+ |
|
11042 |
+ return std::numeric_limits<T>::quiet_NaN(); |
|
11022 |