Skip to content

Commit 8ad9ae8

Browse files
committed
Merge pull request #171 from RcppCore/feature/no-vector-from-string
mark two Vector ctors as deprecated
2 parents 674124c + 1fc5cf0 commit 8ad9ae8

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2014-08-30 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/include/Rcpp/vector/Vector.h: Mark two 'from string' ctors as
4+
deprecated following a suggestion by Yixuan Qiu
5+
16
2014-08-18 Dirk Eddelbuettel <[email protected]>
27

38
* vignettes/Rcpp-FAQ.Rnw: Added a new entry regarding licensing of

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: Rcpp
22
Title: Seamless R and C++ Integration
3-
Version: 0.11.2.1
3+
Version: 0.11.2.2
44
Date: 2014-06-11
55
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey,
66
Douglas Bates, and John Chambers

inst/NEWS.Rd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
\itemize{
3333
\item The \code{Rcpp-FAQ} vignette was updated with respect to OS X issues.
3434
}
35+
\item Deprecation of unused Rcpp featires:
36+
\itemize{
37+
\item The \code{Vector} class has two constructors from \code{std::string}
38+
and \code{const char*} which are not fully functional and will be
39+
withdrawn twelve months after this release.
40+
}
3541
}
3642
}
3743

inst/include/Rcpp/vector/Vector.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,15 @@ class Vector :
8888
Storage::set__( Rf_allocVector( RTYPE, size) ) ;
8989
fill( u ) ;
9090
}
91+
9192
Vector( const std::string& st ){
9293
RCPP_DEBUG_2( "Vector<%d>( const std::string& = %s )", RTYPE, st.c_str() )
94+
Rf_warning("The Vector(std::string) constructor is deprecated and will be removed in a future release.");
9395
Storage::set__( internal::vector_from_string<RTYPE>(st) ) ;
9496
}
9597
Vector( const char* st ) {
9698
RCPP_DEBUG_2( "Vector<%d>( const char* = %s )", RTYPE, st )
99+
Rf_warning("The Vector(const char*) constructor is deprecated and will be removed in a future release.");
97100
Storage::set__(internal::vector_from_string<RTYPE>(st) ) ;
98101
}
99102

0 commit comments

Comments
 (0)