|
From: | Markus Mützel |
Subject: | [Octave-bug-tracker] [bug #65244] Simplify code complexity of perms.cc |
Date: | Fri, 9 Feb 2024 06:02:45 -0500 (EST) |
Follow-up Comment #9, bug#65244 (group octave): > Note that "the constexpr if statement" that is used in the patch is a feature of C++17. Good point. I wonder if something like the following would work with C++11 and be optimized to virtually the same code as the constexpr if: static constexpr bool is_same_type = std::is_same<T, octave_value>::value: if (is_same_type) IsEqual = Ar[i].is_equal (Ar[j]); else IsEqual = (Ar[i] == Ar[j]); (Not sure if `static` is necessary.) _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?65244> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |