]> git.lyx.org Git - features.git/commitdiff
Replace deprecated std::result_of, make nod library compatible with C++20
authorYuriy Skalko <yuriy.skalko@gmail.com>
Tue, 29 Dec 2020 23:35:25 +0000 (01:35 +0200)
committerYuriy Skalko <yuriy.skalko@gmail.com>
Wed, 30 Dec 2020 16:02:11 +0000 (18:02 +0200)
3rdparty/nod/nod.hpp

index 5c4a93cb8593277cef484c1085b6abd4909879d7..4cc18fe1b8a0c2c70eb02dc892a8aca19cda032f 100644 (file)
@@ -269,7 +269,11 @@ namespace nod {
        {
                public:
                        /// Result type when calling the accumulating function operator.
+#if __cplusplus >= 201703L
+                       using result_type = typename std::invoke_result<F, T, typename S::slot_type::result_type>::type;
+#else
                        using result_type = typename std::result_of<F(T, typename S::slot_type::result_type)>::type;
+#endif
 
                        /// Construct a signal_accumulator as a proxy to a given signal
                        //