1 // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
2 
3 /******************************************************************************
4  *
5  *  file:  sstream.h
6  *
7  *  Copyright (c) 2003, Michael E. Smoot .
8  *  Copyright (c) 2004, Michael E. Smoot, Daniel Aarno .
9  *  Copyright (c) 2017 Google Inc.
10  *  All rights reserved.
11  *
12  *  See the file COPYING in the top directory of this distribution for
13  *  more information.
14  *
15  *  THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
16  *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  *  DEALINGS IN THE SOFTWARE.
22  *
23  *****************************************************************************/
24 
25 #ifndef TCLAP_SSTREAM_H
26 #define TCLAP_SSTREAM_H
27 
28 #if !defined(HAVE_STRSTREAM)
29 // Assume sstream is available if strstream is not specified
30 // (https://sourceforge.net/p/tclap/bugs/23/)
31 #define HAVE_SSTREAM
32 #endif
33 
34 #if defined(HAVE_SSTREAM)
35 #include <sstream>
36 namespace TCLAP {
37     typedef std::istringstream istringstream;
38     typedef std::ostringstream ostringstream;
39 }
40 #elif defined(HAVE_STRSTREAM)
41 #include <strstream>
42 namespace TCLAP {
43     typedef std::istrstream istringstream;
44     typedef std::ostrstream ostringstream;
45 }
46 #else
47 #error "Need a stringstream (sstream or strstream) to compile!"
48 #endif
49 
50 #endif  // TCLAP_SSTREAM_H
51