mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 04:47:29 +02:00
Use winapi
This commit is contained in:
@ -5,6 +5,7 @@ Version 86:
|
|||||||
* Use custom variant
|
* Use custom variant
|
||||||
* Update README.md
|
* Update README.md
|
||||||
* Add local-travis.sh
|
* Add local-travis.sh
|
||||||
|
* Use winapi
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#ifdef BOOST_WINDOWS
|
#ifdef BOOST_WINDOWS
|
||||||
#include <boost/detail/winapi/basic_types.hpp>
|
#include <boost/detail/winapi/basic_types.hpp>
|
||||||
//#include <boost/detail/winapi/debugapi.hpp>
|
#include <boost/detail/winapi/debugapi.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -36,8 +36,8 @@ class dstream_buf
|
|||||||
{
|
{
|
||||||
using ostream = std::basic_ostream<CharT, Traits>;
|
using ostream = std::basic_ostream<CharT, Traits>;
|
||||||
|
|
||||||
bool dbg_;
|
|
||||||
ostream& os_;
|
ostream& os_;
|
||||||
|
bool dbg_;
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void write(T const*) = delete;
|
void write(T const*) = delete;
|
||||||
@ -45,14 +45,14 @@ class dstream_buf
|
|||||||
void write(char const* s)
|
void write(char const* s)
|
||||||
{
|
{
|
||||||
if(dbg_)
|
if(dbg_)
|
||||||
/*boost::detail::winapi*/::OutputDebugStringA(s);
|
boost::detail::winapi::OutputDebugStringA(s);
|
||||||
os_ << s;
|
os_ << s;
|
||||||
}
|
}
|
||||||
|
|
||||||
void write(wchar_t const* s)
|
void write(wchar_t const* s)
|
||||||
{
|
{
|
||||||
if(dbg_)
|
if(dbg_)
|
||||||
/*boost::detail::winapi*/::OutputDebugStringW(s);
|
boost::detail::winapi::OutputDebugStringW(s);
|
||||||
os_ << s;
|
os_ << s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ public:
|
|||||||
explicit
|
explicit
|
||||||
dstream_buf(ostream& os)
|
dstream_buf(ostream& os)
|
||||||
: os_(os)
|
: os_(os)
|
||||||
, dbg_(/*boost::detail::winapi*/::IsDebuggerPresent() != 0)
|
, dbg_(boost::detail::winapi::IsDebuggerPresent() != 0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user