[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");
- [lmi-commits] [lmi] master updated (0ec5f1b -> 9cc560d), Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 88f799c 6/8: Avoid using gcc-specific warnings with clang, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master d126046 5/8: Disable clang -Wbraced-scalar-init in a test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 9cc560d 8/8: Fix defect introduced 20210303T1108Z: misalignment, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 71238a3 4/8: Disable clang tautological constant compare warning in a test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 0dda3f5 2/8: Disable clang -Wself-assign-overloaded warning in date test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master fc767f7 3/8: Include <cmath> to get std::rint() declaration, not <math.h>, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 33a1270 1/8: Remove tests involving std::mem_fun,
Greg Chicares <=
- [lmi-commits] [lmi] master f5d41a0 7/8: Replace raw string literals, Greg Chicares, 2021/03/08