forked from boostorg/optional
Add support for BOOST_NO_IOSTREAM
This commit is contained in:
@ -10,15 +10,19 @@
|
||||
// You are welcome to contact the author at:
|
||||
// fernando_cacciola@hotmail.com
|
||||
|
||||
#include <sstream>
|
||||
#include "boost/optional/optional.hpp"
|
||||
#include "boost/optional/optional_io.hpp"
|
||||
#include "boost/core/lightweight_test.hpp"
|
||||
|
||||
#ifndef BOOST_NO_IOSTREAM
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#ifdef BOOST_BORLANDC
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "boost/core/lightweight_test.hpp"
|
||||
|
||||
|
||||
using boost::optional;
|
||||
|
||||
@ -29,7 +33,7 @@ void test2( Opt o, Opt buff )
|
||||
|
||||
const int markv = 123 ;
|
||||
int mark = 0 ;
|
||||
|
||||
|
||||
s << o << " " << markv ;
|
||||
s >> buff >> mark ;
|
||||
|
||||
@ -85,3 +89,12 @@ int main()
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
#else // BOOST_NO_IOSTREAM
|
||||
|
||||
int main()
|
||||
{
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_IOSTREAM
|
||||
|
Reference in New Issue
Block a user