@@ -315,29 +315,30 @@ TEST_CASE("function static") {
315
315
}
316
316
#endif
317
317
};
318
+ #ifdef SQLITE_ORM_STATIC_CALL_OPERATOR_SUPPORTED
319
+ constexpr auto lambda_static = [](unsigned long errcode) static {
320
+ return errcode != 0 ;
321
+ };
322
+ #endif
318
323
319
324
SECTION (" detect overloaded call operator" ) {
320
- constexpr auto lambda = [](unsigned long errcode) {
321
- return errcode != 0 ;
322
- };
325
+ constexpr auto lambda = [](unsigned long ) {};
323
326
using lambda_type = std::remove_const_t <decltype (lambda)>;
324
327
325
328
STATIC_REQUIRE (
326
- polyfill::is_detected_v<internal::overloaded_callop_t , bool (unsigned long ) const , lambda_type>);
329
+ polyfill::is_detected_v<internal::overloaded_callop_t , void (unsigned long ) const , lambda_type>);
327
330
STATIC_REQUIRE_FALSE (
328
- polyfill::is_detected_v<internal::overloaded_static_callop_t , bool (unsigned long ) const , lambda_type>);
331
+ polyfill::is_detected_v<internal::overloaded_static_callop_t , void (unsigned long ) const , lambda_type>);
329
332
}
330
333
#ifdef SQLITE_ORM_STATIC_CALL_OPERATOR_SUPPORTED
331
334
SECTION (" detect overloaded static call operator" ) {
332
- constexpr auto lambda = [](unsigned long errcode) static {
333
- return errcode != 0 ;
334
- };
335
- using lambda_type = std::remove_const_t <decltype (lambda)>;
335
+ constexpr auto lambda_static = [](unsigned long ) static {};
336
+ using lambda_type = std::remove_const_t <decltype (lambda_static)>;
336
337
337
338
STATIC_REQUIRE_FALSE (
338
- polyfill::is_detected_v<internal::overloaded_callop_t , bool (unsigned long ), lambda_type>);
339
+ polyfill::is_detected_v<internal::overloaded_callop_t , void (unsigned long ), lambda_type>);
339
340
STATIC_REQUIRE (
340
- polyfill::is_detected_v<internal::overloaded_static_callop_t , bool (unsigned long ), lambda_type>);
341
+ polyfill::is_detected_v<internal::overloaded_static_callop_t , void (unsigned long ), lambda_type>);
341
342
}
342
343
#endif
343
344
SECTION (" freestanding function" ) {
@@ -424,11 +425,11 @@ TEST_CASE("function static") {
424
425
}
425
426
#ifdef SQLITE_ORM_STATIC_CALL_OPERATOR_SUPPORTED
426
427
SECTION (" static lambda" ) {
427
- constexpr auto lambda = [](unsigned long errcode) static {
428
+ constexpr auto lambda_static = [](unsigned long errcode) static {
428
429
return errcode != 0 ;
429
430
};
430
- using lambda_type = std::remove_const_t <decltype (lambda )>;
431
- constexpr auto quotedScalar = " f" _scalar.quote (lambda );
431
+ using lambda_type = std::remove_const_t <decltype (lambda_static )>;
432
+ constexpr auto quotedScalar = " f" _scalar.quote (lambda_static );
432
433
using quoted_type = std::remove_const_t <decltype (quotedScalar)>;
433
434
434
435
STATIC_REQUIRE (quotedScalar._nme [0 ] == ' f' && quotedScalar._nme [1 ] == ' \0 ' );
0 commit comments