@@ -518,26 +518,26 @@ template <typename... Args> struct process_attributes {
518
518
static void init (const Args&... args, function_record *r) {
519
519
PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100 (r);
520
520
PYBIND11_WORKAROUND_INCORRECT_ALL_GCC_UNUSED_BUT_SET_PARAMETER (r);
521
- int unused[] = { 0 , (process_attribute< typename std::decay<Args>::type>:: init (args, r), 0 ) ... };
522
- silence_unused_warnings (unused );
521
+ PYBIND11_INT_ARRAY_WORKING_AROUND_MSVC_CLANG_ISSUES (
522
+ { 0 , (process_attribute< typename std::decay<Args>::type>:: init (args, r), 0 )...} );
523
523
}
524
524
static void init (const Args&... args, type_record *r) {
525
525
PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100 (r);
526
526
PYBIND11_WORKAROUND_INCORRECT_ALL_GCC_UNUSED_BUT_SET_PARAMETER (r);
527
- int unused[] = { 0 , (process_attribute< typename std::decay<Args>::type>:: init (args, r), 0 ) ... };
528
- silence_unused_warnings (unused );
527
+ PYBIND11_INT_ARRAY_WORKING_AROUND_MSVC_CLANG_ISSUES (
528
+ { 0 , (process_attribute< typename std::decay<Args>::type>:: init (args, r), 0 )...} );
529
529
}
530
530
static void precall (function_call &call) {
531
531
PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100 (call);
532
- // int unused[] = { 0, (process_attribute<typename std::decay<Args>::type>::precall(call), 0) ... };
533
- // silence_unused_warnings(unused);
534
- (int []) { 0 , (process_attribute<typename std::decay<Args>::type>::precall (call), 0 ) ... };
532
+ PYBIND11_INT_ARRAY_WORKING_AROUND_MSVC_CLANG_ISSUES (
533
+ {0 , (process_attribute<typename std::decay<Args>::type>::precall (call), 0 )...});
535
534
}
536
535
static void postcall (function_call &call, handle fn_ret) {
537
536
PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100 (call, fn_ret);
538
537
PYBIND11_WORKAROUND_INCORRECT_ALL_GCC_UNUSED_BUT_SET_PARAMETER (fn_ret);
539
- int unused[] = { 0 , (process_attribute<typename std::decay<Args>::type>::postcall (call, fn_ret), 0 ) ... };
540
- silence_unused_warnings (unused);
538
+ PYBIND11_INT_ARRAY_WORKING_AROUND_MSVC_CLANG_ISSUES (
539
+ {0 ,
540
+ (process_attribute<typename std::decay<Args>::type>::postcall (call, fn_ret), 0 )...});
541
541
}
542
542
};
543
543
0 commit comments