x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
resolve.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\iostreams\detail\resolve.hpp
旋转
特效
属性
历史版本
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2003-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for documentation. #ifndef BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED #define BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
// partial spec, put size_t in std. #include
// std::size_t. #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// true_. #include
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # include
#endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) #include
// Must come last. #include
// VC7.1 C4224. namespace boost { namespace iostreams { namespace detail { //------------------Definition of resolve-------------------------------------// #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //-------------------------// template
struct resolve_traits { typedef typename mpl::if_< boost::detail::is_incrementable
, output_iterator_adapter
, const T& >::type type; }; # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------------------// template
typename resolve_traits
::type resolve( const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) // I suspect that the compilers which require this workaround may // be correct, but I'm not sure why :( #if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) ||\ BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) || \ BOOST_WORKAROUND(BOOST_IOSTREAMS_GCC, BOOST_TESTED_AT(400)) \ /**/ , typename disable_if< is_iterator_range
>::type* = 0 #endif ) { typedef typename resolve_traits
::type return_type; return return_type(t); } template
mode_adapter< Mode, std::basic_streambuf
> resolve(std::basic_streambuf
& sb) { return mode_adapter< Mode, std::basic_streambuf
>(wrap(sb)); } template
mode_adapter< Mode, std::basic_istream
> resolve(std::basic_istream
& is) { return mode_adapter< Mode, std::basic_istream
>(wrap(is)); } template
mode_adapter< Mode, std::basic_ostream
> resolve(std::basic_ostream
& os) { return mode_adapter< Mode, std::basic_ostream
>(wrap(os)); } template
mode_adapter< Mode, std::basic_iostream
> resolve(std::basic_iostream
& io) { return mode_adapter< Mode, std::basic_iostream
>(wrap(io)); } template
array_adapter
resolve(Ch (&array)[N]) { return array_adapter
(array); } # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) template
range_adapter< Mode, boost::iterator_range
> resolve(const boost::iterator_range
& rng) { return range_adapter< Mode, boost::iterator_range
>(rng); } # endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //---------------------// template
typename resolve_traits
::type resolve( const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) #if defined(__GNUC__) , typename disable_if< is_iterator_range
>::type* = 0 #endif ) { typedef typename resolve_traits
::type return_type; return return_type(t); } template
mode_adapter
resolve(std::streambuf& sb) { return mode_adapter
(wrap(sb)); } template
mode_adapter
resolve(std::istream& is) { return mode_adapter
(wrap(is)); } template
mode_adapter
resolve(std::ostream& os) { return mode_adapter
(wrap(os)); } template
mode_adapter
resolve(std::iostream& io) { return mode_adapter
(wrap(io)); } template
array_adapter
resolve(Ch (&array)[N]) { return array_adapter
(array); } template
range_adapter< Mode, boost::iterator_range
> resolve(const boost::iterator_range
& rng) { return range_adapter< Mode, boost::iterator_range
>(rng); } # endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------// #else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //----------------// template
struct resolve_traits { // Note: test for is_iterator_range must come before test for output // iterator. typedef typename iostreams::select< // Disambiguation for Tru64. is_std_io
, mode_adapter
, is_iterator_range
, range_adapter
, is_dereferenceable
, output_iterator_adapter
, is_array
, array_adapter
, else_, #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) const T& #else T #endif >::type type; }; template
typename resolve_traits
::type resolve(const T& t, mpl::true_) { // Bad overload resolution. typedef typename resolve_traits
::type return_type; return return_type(wrap(const_cast
(t))); } template
typename resolve_traits
::type resolve(const T& t, mpl::false_) { typedef typename resolve_traits
::type return_type; return return_type(t); } template
typename resolve_traits
::type resolve(const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T)) { return resolve
(t, is_std_io
()); } # if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \ !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \ !defined(__GNUC__) // ---------------------------------------------------// template
typename resolve_traits
::type resolve(T& t, mpl::true_) { typedef typename resolve_traits
::type return_type; return return_type(wrap(t)); } template
typename resolve_traits
::type resolve(T& t, mpl::false_) { typedef typename resolve_traits
::type return_type; return return_type(t); } template
typename resolve_traits
::type resolve(T& t BOOST_IOSTREAMS_ENABLE_IF_STREAM(T)) { return resolve
(t, is_std_io
()); } # endif // Borland 5.x, VC6-7.0 or GCC 2.9x //--------------------------------// #endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------// } } } // End namespaces detail, iostreams, boost. #include
// VC7.1 4224. #endif // BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED
resolve.hpp
网页地址
文件地址
上一页
30/38
下一页
下载
( 8 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.