lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 33a1270 1/8: Remove tests involving std::mem_


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 33a1270 1/8: Remove tests involving std::mem_fun
Date: Mon, 8 Mar 2021 11:19:46 -0500 (EST)

branch: master
commit 33a1270dd6f3a68e67d4e49e2dcdd755ebeb0f39
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Remove tests involving std::mem_fun
    
    std::mem_fun and the related types were deprecated in C++11 and
    removed in C++17, so it doesn't make sense to have them in lmi which
    requires C++17 now.
    
    In practice, MSVS and gcc still provide std::mem_fun() even in C++17
    mode, but clang does not (as it has every right to do), so removing this
    code fixes the test compilation with clang.
---
 any_member_test.cpp | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/any_member_test.cpp b/any_member_test.cpp
index 8ec0ddc..c8471e4 100644
--- a/any_member_test.cpp
+++ b/any_member_test.cpp
@@ -377,21 +377,6 @@ void any_member_test::test_any_member()
 //
 // Because the problem seems confined to borland tools, I will guess
 // that it's simply a compiler defect.
-
-    // Want to be able to unify a subobject with a pmf, e.g.
-//    s["s0"].size();
-    // no matching function for call to `any_member<S>::size()
-    std::string str("xyzzy");
-
-//    std::mem_fun(&std::string::size);
-//    str.string_size();
-
-//    str.(std::mem_fun(&std::string::size));
-
-//    std::mem_fun_t sizer;
-//    std::mem_fun_t sizer();
-//    std::const_mem_fun_t(std::string::size);
-    std::mem_fun(&std::string::size)(&str);
 }
 
 void any_member_test::supplemental_test0()
@@ -400,18 +385,6 @@ void any_member_test::supplemental_test0()
     X x;
 
     {
-    std::cout << "Testing std::mem_fun family.\n";
-    s.x0.set_str("Test 0");
-    x.set_str("Test 0x");
-    std::mem_fun1_t<int, X, std::string> x_memfun(&X::foo);
-    X* px = &x;
-//    px->*x_memfun; // Error: it's a functor, not a pmf.
-    x_memfun(px, "example 0");
-    std::mem_fun(&X::foo)(px, "example 1");
-    std::cout << std::endl;
-    }
-
-    {
     std::cout << "Testing plain pointers to member data and function.\n";
     s.x0.set_str("Test 1");
     x.set_str("Test 1x");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]