Skip to content

Commit a20c4d9

Browse files
committed
removed C++03 dependency from test
1 parent 9aa208d commit a20c4d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_helper_support.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace std{
2121
#endif
2222

2323
#include "test_tools.hpp"
24-
#include <boost/lexical_cast.hpp>
2524
#include <boost/serialization/split_free.hpp>
2625
#include <boost/serialization/vector.hpp>
2726
#include <string>
@@ -108,7 +107,9 @@ int test_main( int /* argc */, char* /* argv */[] ){
108107

109108
std::vector<my_string> v1;
110109
for(int i=0; i<1000; ++i){
111-
v1.push_back(my_string(boost::lexical_cast<std::string>(i % 100)));
110+
char sbuffer[10];
111+
std::snprintf(sbuffer, sizeof(sbuffer), "%i", i % 100);
112+
v1.push_back(my_string(sbuffer));
112113
}
113114
{
114115
test_ostream os(testfile, TEST_STREAM_FLAGS);

0 commit comments

Comments
 (0)