File tree Expand file tree Collapse file tree 2 files changed +13
-16
lines changed
Expand file tree Collapse file tree 2 files changed +13
-16
lines changed Original file line number Diff line number Diff line change 2323namespace Rcpp {
2424namespace traits {
2525
26- template <typename T>
27- class _has_copy_constructor_helper : __sfinae_types {
28- template <typename U> struct _Wrap_type { };
29-
30- template <typename U>
31- static __one __test (U);
32-
33- template <typename U>
34- static __two __test (...);
35-
36- public:
37- static const bool value = sizeof (__test<T>(0 )) == 1 ;
38- };
39-
40- template <typename T> struct has_copy_constructor :
41- integral_constant<bool ,_has_copy_constructor_helper<T>::value> { };
26+ #if defined(RCPP_USING_CXX11)
27+ template <typename T> struct has_copy_constructor :
28+ integral_constant<bool , std::is_copy_constructible<T>::value >{} ;
29+ #else
30+ template <typename T> struct has_copy_constructor : true_type ;
31+ #endif
4232
4333} // traits
4434} // Rcpp
Original file line number Diff line number Diff line change @@ -119,6 +119,13 @@ class ModuleCopyConstructor {
119119} ;
120120
121121RCPP_EXPOSED_CLASS (ModuleTest)
122+
123+ namespace Rcpp {
124+ namespace traits {
125+ template <> struct has_copy_constructor <ModuleTest> : false_type ;
126+ }
127+ }
128+
122129class ModuleTest {
123130public:
124131 double value;
You can’t perform that action at this time.
0 commit comments