epoc32/include/stdapis/stlport/stl/_null_stream.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 _null_stream.h
     1 /*
       
     2  * Copyright (c) 2000
       
     3  * Boris Fomitchev
       
     4  *
       
     5  * This material is provided "as is", with absolutely no warranty expressed
       
     6  * or implied. Any use is at your own risk.
       
     7  *
       
     8  * Permission to use or copy this software for any purpose is hereby granted 
       
     9  * without fee, provided the above notices are retained on all copies.
       
    10  * Permission to modify the code and to distribute modified code is granted,
       
    11  * provided the above notices are retained, and a notice that the code was
       
    12  * modified is included with the above copyright notice.
       
    13  *
       
    14  */
       
    15 
       
    16 #ifndef _STLP_NULL_STREAM_H
       
    17 # define _STLP_NULL_STREAM_H
       
    18 
       
    19 _STLP_BEGIN_NAMESPACE
       
    20 
       
    21 struct __null_stream 
       
    22 {
       
    23     void flush() { }
       
    24 };
       
    25 
       
    26 template <class _Tp>
       
    27 __null_stream& operator <<(__null_stream& __x, const _Tp& ) 
       
    28 {
       
    29     return __x;
       
    30 }
       
    31 
       
    32 template <class _Tp>
       
    33 __null_stream& operator >>(const _Tp&, __null_stream& __x ) 
       
    34 {
       
    35     return __x;
       
    36 }
       
    37 
       
    38 extern __null_stream cin, cout, cerr, endl, ws, hex, dec;
       
    39 
       
    40 _STLP_END_NAMESPACE
       
    41 
       
    42 # endif