|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85645 - trunk/boost/wave/util
From: hartmut.kaiser_at_[hidden]
Date: 2013-09-10 18:29:47
Author: hkaiser
Date: 2013-09-10 18:29:46 EDT (Tue, 10 Sep 2013)
New Revision: 85645
URL: http://svn.boost.org/trac/boost/changeset/85645
Log:
Wave: removed code under SGI's license as this is incompatible with Boost
Text files modified:
trunk/boost/wave/util/flex_string.hpp | 76 ++-------------------------------------
1 files changed, 4 insertions(+), 72 deletions(-)
Modified: trunk/boost/wave/util/flex_string.hpp
==============================================================================
--- trunk/boost/wave/util/flex_string.hpp Tue Sep 10 15:40:14 2013 (r85644)
+++ trunk/boost/wave/util/flex_string.hpp 2013-09-10 18:29:46 EDT (Tue, 10 Sep 2013) (r85645)
@@ -30,6 +30,10 @@
// #HK090523:
// - Incorporated the changes from latest version of flex_string as
// maintained in Loki
+//
+// #HK130910:
+// - Removed the getline implementation which was borrowed from the SGI
+// STL as the license for this code is not compatible with Boost.
#ifndef FLEX_STRING_INC_
#define FLEX_STRING_INC_
@@ -2525,78 +2529,6 @@
const flex_string<E, T, A, S>& str)
{ return os << str.c_str(); }
-
-// The getline below implementations are from the SGI STL (http://www.sgi.com/tech/stl/)
-// and come with the following copyright:
-//
-// Permission to use, copy, modify, distribute and sell this software and its
-// documentation for any purpose is hereby granted without fee, provided that
-// the below copyright notice appears in all copies and that both the copyright
-// notice and this permission notice appear in supporting documentation. Silicon
-// Graphics makes no representations about the suitability of this software for
-// any purpose. It is provided "as is" without express or implied warranty.
-//
-// Copyright (c) 1997-1999
-// Silicon Graphics Computer Systems, Inc.
-//
-// Copyright (c) 1994
-// Hewlett-Packard Company
-
-template <typename E, class T, class A, class S>
-std::basic_istream<typename flex_string<E, T, A, S>::value_type,
- typename flex_string<E, T, A, S>::traits_type>&
-getline(
- std::basic_istream<typename flex_string<E, T, A, S>::value_type,
- typename flex_string<E, T, A, S>::traits_type>& is,
- flex_string<E, T, A, S>& str,
- typename flex_string<E, T, A, S>::value_type delim)
-{
- size_t nread = 0;
- typename std::basic_istream<typename flex_string<E, T, A, S>::value_type,
- typename flex_string<E, T, A, S>::traits_type>::sentry sentry(is, true);
-
- if (sentry) {
- std::basic_streambuf<typename flex_string<E, T, A, S>::value_type,
- typename flex_string<E, T, A, S>::traits_type>* buf = is.rdbuf();
- str.clear();
-
- while (nread < str.max_size()) {
- int c1 = buf->sbumpc();
- if (flex_string<E, T, A, S>::traits_type::eq_int_type(c1,
- flex_string<E, T, A, S>::traits_type::eof()))
- {
- is.setstate(std::ios_base::eofbit);
- break;
- }
- else {
- ++nread;
- typename flex_string<E, T, A, S>::value_type c =
- flex_string<E, T, A, S>::traits_type::to_char_type(c1);
-
- if (!flex_string<E, T, A, S>::traits_type::eq(c, delim))
- str.push_back(c);
- else
- break; // Character is extracted but not appended.
- }
- }
- }
- if (nread == 0 || nread >= str.max_size())
- is.setstate(std::ios_base::failbit);
-
- return is;
-}
-
-template <typename E, class T, class A, class S>
-std::basic_istream<typename flex_string<E, T, A, S>::value_type,
- typename flex_string<E, T, A, S>::traits_type>&
-getline(
- std::basic_istream<typename flex_string<E, T, A, S>::value_type,
- typename flex_string<E, T, A, S>::traits_type>& is,
- flex_string<E, T, A, S>& str)
-{
- return getline(is, str, is.widen('\n'));
-}
-
template <typename E1, class T, class A, class S>
const typename flex_string<E1, T, A, S>::size_type
flex_string<E1, T, A, S>::npos = (typename flex_string<E1, T, A, S>::size_type)(-1);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk