fmt/test
Mike Crowe e6ef927e6b
fmt::ptr: Support function pointers (#2131)
Passing a function pointer to fmt::ptr results in:

 In file included from /home/mac/git/fmt/test/gmock/gmock.h:238,
                  from /home/mac/git/fmt/test/format-test.cc:31:
 .../fmt/test/format-test.cc: In member function ‘virtual void FormatterTest_FormatPointer_Test::TestBody()’:
 .../fmt/test/format-test.cc:1486:56: error: no matching function for call to ‘ptr(void (&)(int, double, std::__cxx11::string))’
              format("{}", fmt::ptr(function_pointer_test)));

with GCC and Clang. Let's add an overload to support that usage.

Unfortunately, MSVC would
consider the overload to be ambiguous for unknown reasons:

 D:\a\fmt\fmt\test\format-test.cc(1485,1): error C2668: 'fmt::v7::ptr': ambiguous call to overloaded function [D:\a\fmt\build\test\format-test.vcxproj]
 D:\a\fmt\fmt\include\fmt/format.h(3742,60): message : could be 'const void *fmt::v7::ptr<void,int,double,std::string>(T (__cdecl *)(int,double,std::string))' [D:\a\fmt\build\test\format-test.vcxproj]
           with
           [
               T=void
           ]
 D:\a\fmt\fmt\include\fmt/format.h(3735,42): message : or       'const void *fmt::v7::ptr<void(int,double,std::string)>(T (__cdecl *))' [D:\a\fmt\build\test\format-test.vcxproj]
           with
           [
               T=void (int,double,std::string)
           ]
 D:\a\fmt\fmt\test\format-test.cc(1486,1): message : while trying to match the argument list '(overloaded-function)' [D:\a\fmt\build\test\format-test.vcxproj]

but luckily this means that the overload is unnecessary in that case
anyway, so we can just make it conditional.
2021-02-09 07:35:16 -08:00
..
add-subdirectory-test Bump tested CMake version to 3.18 2020-07-19 08:50:34 -07:00
compile-error-test Bump tested CMake version to 3.18 2020-07-19 08:50:34 -07:00
cuda-test
find-package-test Bump tested CMake version to 3.18 2020-07-19 08:50:34 -07:00
fuzzing Fuzz fallback formatter 2020-11-03 19:34:35 -08:00
gmock
gtest
assert-test.cc Explain why assert-test is a separate test 2020-10-11 10:13:42 -07:00
chrono-test.cc Implement compile-time checks by default 2020-11-15 17:24:36 -08:00
CMakeLists.txt Fix formatting 2020-12-24 07:07:15 -08:00
color-test.cc Fix coding conventions 2020-09-06 09:26:32 -07:00
compile-test.cc Fix std::byte formatting with compile-time API (#2072) 2020-12-27 07:23:28 -08:00
core-test.cc Implement compile-time checks by default 2020-11-15 17:24:36 -08:00
enforce-compile-string-test.cc Add tests for FMT_ENFORCE_COMPILE_STRING, fix several errors (#2038) 2020-12-24 06:40:46 -08:00
format Reduce <algorithm> usage (#1998) 2020-11-11 09:12:15 -08:00
format-impl-test.cc Make GetCachedPower test more precise 2020-10-04 08:00:47 -07:00
format-test.cc fmt::ptr: Support function pointers (#2131) 2021-02-09 07:35:16 -08:00
gmock-gtest-all.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
gtest-extra-test.cc Fix build failure when not using fcntl with -Werror (#1990) 2020-11-06 15:39:59 -08:00
gtest-extra.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
gtest-extra.h Add color format_to overloads 2020-09-06 08:24:15 -07:00
header-only-test2.cc
header-only-test.cc
locale-test.cc Make 'L' a modifier 2021-01-17 09:28:46 -08:00
mock-allocator.h Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
os-test.cc Forward arguments to work with views (#2068) 2020-12-20 07:14:54 -08:00
ostream-test.cc Reenable support for fallback formatter in join (#2040) (#2050) 2020-12-08 08:56:53 -08:00
posix-mock-test.cc Fix build failure when not using fcntl with -Werror (#1990) 2020-11-06 15:39:59 -08:00
posix-mock.h Fix posix-mock-test 2020-04-01 08:42:14 -07:00
printf-test.cc fix typo which caused the loss of the counting information when using a printf context with a truncating_iterator 2020-06-05 07:37:54 -07:00
ranges-test.cc Make ranges-test available with C++11 (#2114) 2021-01-30 07:42:58 -08:00
scan-test.cc internal -> detail (#1538) 2020-05-10 07:34:30 -07:00
scan.h Optimize format string parsing 2020-06-06 08:15:33 -07:00
std-format-test.cc 🐛 Cannot call non-constexpr function in constexpr context (#2010) 2020-11-12 10:10:52 -08:00
test-assert.h Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
test-main.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
util.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
util.h Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00