Skip to content

Commit 5b903af

Browse files
Fix unused variable warning
1 parent 8a6ac08 commit 5b903af

File tree

1 file changed

+5
-5
lines changed
  • inst/include/Rcpp/sugar/matrix

1 file changed

+5
-5
lines changed

inst/include/Rcpp/sugar/matrix/eye.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ namespace Rcpp {
2626
namespace traits {
2727

2828
template<bool>
29-
struct static_assertion;
29+
struct allowed_matrix_type;
3030

3131
template<>
32-
struct static_assertion<true> {};
32+
struct allowed_matrix_type<true> {};
3333

3434
template <typename T>
3535
class one_type {
@@ -90,7 +90,7 @@ class eye {
9090
traits::is_arithmetic<stored_type>::value ||
9191
traits::same_type<stored_type, Rcomplex>::value;
9292

93-
traits::static_assertion<enabled> allowed_matrix_type;
93+
(void)sizeof(traits::allowed_matrix_type<enabled>);
9494

9595
typedef traits::one_type<stored_type> one_type;
9696

@@ -115,7 +115,7 @@ class ones {
115115
traits::is_arithmetic<stored_type>::value ||
116116
traits::same_type<stored_type, Rcomplex>::value;
117117

118-
traits::static_assertion<enabled> allowed_matrix_type;
118+
(void)sizeof(traits::allowed_matrix_type<enabled>);
119119

120120
typedef traits::one_type<stored_type> one_type;
121121

@@ -143,7 +143,7 @@ class zeros {
143143
traits::is_arithmetic<stored_type>::value ||
144144
traits::same_type<stored_type, Rcomplex>::value;
145145

146-
traits::static_assertion<enabled> allowed_matrix_type;
146+
(void)sizeof(traits::allowed_matrix_type<enabled>);
147147

148148
typedef traits::zero_type<stored_type> zero_type;
149149

0 commit comments

Comments
 (0)