summaryrefslogtreecommitdiff
path: root/boost/test/utils/iterator/token_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/test/utils/iterator/token_iterator.hpp')
-rw-r--r--boost/test/utils/iterator/token_iterator.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/boost/test/utils/iterator/token_iterator.hpp b/boost/test/utils/iterator/token_iterator.hpp
index abc530041d..e3a923a2ee 100644
--- a/boost/test/utils/iterator/token_iterator.hpp
+++ b/boost/test/utils/iterator/token_iterator.hpp
@@ -300,8 +300,12 @@ public:
this->init();
}
- template<typename Src, typename Modifier>
- basic_string_token_iterator( Src src, Modifier const& m )
+ // warning: making the constructor accept anything else than a cstring should
+ // ensure that no temporary object is created during string creation (previous
+ // definition was "template<typename Src, typename Modifier> basic_string_token_iterator( Src src ..."
+ // which may create a temporary string copy when called with an std::string.
+ template<typename Modifier>
+ basic_string_token_iterator( cstring src, Modifier const& m )
: m_src( src )
{
this->apply_modifier( m );