亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? optional.hpp

?? CGAL is a collaborative effort of several sites in Europe and Israel. The goal is to make the most i
?? HPP
?? 第 1 頁 / 共 2 頁
字號:
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.//// Use, modification, and distribution is subject to 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/lib/optional for documentation.//// You are welcome to contact the author at://  fernando_cacciola@hotmail.com//#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP#include<new>#include<algorithm>#include "boost/config.hpp"#include "boost/assert.hpp"#include "boost/type.hpp"#include "boost/type_traits/alignment_of.hpp"#include "boost/type_traits/type_with_alignment.hpp"#include "boost/type_traits/remove_reference.hpp"#include "boost/type_traits/is_reference.hpp"#include "boost/mpl/if.hpp"#include "boost/mpl/bool.hpp"#include "boost/mpl/not.hpp"#include "boost/detail/reference_content.hpp"#include "boost/detail/none_t.hpp"#include "boost/utility/compare_pointees.hpp"#if BOOST_WORKAROUND(BOOST_MSVC, == 1200)// VC6.0 has the following bug://   When a templated assignment operator exist, an implicit conversion//   constructing an optional<T> is used when assigment of the form://     optional<T> opt ; opt = T(...);//   is compiled.//   However, optional's ctor is _explicit_ and the assignemt shouldn't compile.//   Therefore, for VC6.0 templated assignment is disabled.//#define BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT#endif#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)// VC7.0 has the following bug://   When both a non-template and a template copy-ctor exist//   and the templated version is made 'explicit', the explicit is also//   given to the non-templated version, making the class non-implicitely-copyable.//#define BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR#endif#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700)// AFAICT only VC7.1 correctly resolves the overload set// that includes the in-place factory taking functions,// so for the other VC versions, in-place factory support// is disabled#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT#endif#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551)// BCB (5.5.1) cannot parse the nested template struct in an inplace factory.#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT#endif#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \    && BOOST_WORKAROUND(__BORLANDC__, <= 0x564)// BCB (up to 5.64) has the following bug://   If there is a member function/operator template of the form//     template<class Expr> mfunc( Expr expr ) ;//   some calls are resolved to this even if there are other better matches.//   The effect of this bug is that calls to converting ctors and assignments//   are incrorrectly sink to this general catch-all member function template as shown above.#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION#endifnamespace boost {class in_place_factory_base ;class typed_in_place_factory_base ;namespace optional_detail {// This local class is used instead of that in "aligned_storage.hpp"// because I've found the 'official' class to ICE BCB5.5// when some types are used with optional<>// (due to sizeof() passed down as a non-type template parameter)template <class T>class aligned_storage{    // Borland ICEs if unnamed unions are used for this!    union dummy_u    {        char data[ sizeof(T) ];        BOOST_DEDUCED_TYPENAME type_with_alignment<          ::boost::alignment_of<T>::value >::type aligner_;    } dummy_ ;  public:    void const* address() const { return &dummy_.data[0]; }    void      * address()       { return &dummy_.data[0]; }} ;template<class T>struct types_when_isnt_ref{  typedef T const& reference_const_type ;  typedef T &      reference_type ;  typedef T const* pointer_const_type ;  typedef T *      pointer_type ;  typedef T const& argument_type ;} ;template<class T>struct types_when_is_ref{  typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type raw_type ;  typedef raw_type& reference_const_type ;  typedef raw_type& reference_type ;  typedef raw_type* pointer_const_type ;  typedef raw_type* pointer_type ;  typedef raw_type& argument_type ;} ;struct optional_tag {} ;template<class T>class optional_base : public optional_tag{  private :    typedef BOOST_DEDUCED_TYPENAME detail::make_reference_content<T>::type internal_type ;    typedef aligned_storage<internal_type> storage_type ;    typedef types_when_isnt_ref<T> types_when_not_ref ;    typedef types_when_is_ref<T>   types_when_ref   ;    typedef optional_base<T> this_type ;  protected :    typedef T value_type ;    typedef mpl::true_  is_reference_tag ;    typedef mpl::false_ is_not_reference_tag ;    typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;    typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;    typedef bool (this_type::*unspecified_bool_type)() const;    typedef BOOST_DEDUCED_TYPENAME types::reference_type       reference_type ;    typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ;    typedef BOOST_DEDUCED_TYPENAME types::pointer_type         pointer_type ;    typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type   pointer_const_type ;    typedef BOOST_DEDUCED_TYPENAME types::argument_type        argument_type ;    // Creates an optional<T> uninitialized.    // No-throw    optional_base()      :      m_initialized(false) {}    // Creates an optional<T> uninitialized.    // No-throw    optional_base ( detail::none_t const& )      :      m_initialized(false) {}    // Creates an optional<T> initialized with 'val'.    // Can throw if T::T(T const&) does    optional_base ( argument_type val )      :      m_initialized(false)    {      construct(val);    }    // Creates a deep copy of another optional<T>    // Can throw if T::T(T const&) does    optional_base ( optional_base const& rhs )      :      m_initialized(false)    {      if ( rhs.is_initialized() )        construct(rhs.get_impl());    }    // This is used for both converting and in-place constructions.    // Derived classes use the 'tag' to select the appropriate    // implementation (the correct 'construct()' overload)    template<class Expr>    explicit optional_base ( Expr const& expr, Expr const* tag )      :      m_initialized(false)    {      construct(expr,tag);    }    // No-throw (assuming T::~T() doesn't)    ~optional_base() { destroy() ; }    // Assigns from another optional<T> (deep-copies the rhs value)    // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED    void assign ( optional_base const& rhs )      {        destroy();        if ( rhs.is_initialized() )          construct(rhs.get_impl());      }    // Assigns from a T (deep-copies the rhs value)    // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED    void assign ( argument_type val )      {        destroy();        construct(val);      }    // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED    // No-throw (assuming T::~T() doesn't)    void assign ( detail::none_t const& ) { destroy(); }#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT    template<class Expr>    void assign_expr ( Expr const& expr, Expr const* tag )      {        destroy();        construct(expr,tag);      }#endif  public :    // Destroys the current value, if any, leaving this UNINITIALIZED    // No-throw (assuming T::~T() doesn't)    void reset() { destroy(); }    // Replaces the current value -if any- with 'val'    // Basic Guarantee: If T::T( T const& ) throws this is left UNINITIALIZED.    void reset ( argument_type val ) { assign(val); }    // Returns a pointer to the value if this is initialized, otherwise,    // returns NULL.    // No-throw    pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }    pointer_type       get_ptr()       { return m_initialized ? get_ptr_impl() : 0 ; }    bool is_initialized() const { return m_initialized ; }  protected :    void construct ( argument_type val )     {       new (m_storage.address()) internal_type(val) ;       m_initialized = true ;     }#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT    // Constructs in-place using the given factory    template<class Expr>    void construct ( Expr const& factory, in_place_factory_base const* )     {       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;       factory.BOOST_NESTED_TEMPLATE apply<value_type>(m_storage.address()) ;       m_initialized = true ;     }    // Constructs in-place using the given typed factory    template<class Expr>    void construct ( Expr const& factory, typed_in_place_factory_base const* )     {       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;       factory.apply(m_storage.address()) ;       m_initialized = true ;     }#endif    // Constructs using any expression implicitely convertible to the single argument    // of a one-argument T constructor.    // Converting constructions of optional<T> from optional<U> uses this function with    // 'Expr' being of type 'U' and relying on a converting constructor of T from U.    template<class Expr>    void construct ( Expr const& expr, void const* )     {       new (m_storage.address()) internal_type(expr) ;       m_initialized = true ;     }#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION    // BCB5.64 (and probably lower versions) workaround.    //   The in-place factories are supported by means of catch-all constructors    //   and assignment operators (the functions are parameterized in terms of    //   an arbitrary 'Expr' type)    //   This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>    //   to the 'Expr'-taking functions even though explicit overloads are present for them.    //   Thus, the following overload is needed to properly handle the case when the 'lhs'    //   is another optional.    //    // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error    // instead of choosing the wrong overload    //    // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)    template<class Expr>    void construct ( Expr const& expr, optional_tag const* )     {       if ( expr.is_initialized() )       {         // An exception can be thrown here.         // It it happens, THIS will be left uninitialized.         new (m_storage.address()) internal_type(expr.get()) ;         m_initialized = true ;       }     }#endif    void destroy()      {        if ( m_initialized )          destroy_impl(is_reference_predicate()) ;      }    unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; }    reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; }    reference_type       get_impl()       { return dereference(get_object(), is_reference_predicate() ) ; }    pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; }    pointer_type       get_ptr_impl()       { return cast_ptr(get_object(), is_reference_predicate() ) ; }  private :    // internal_type can be either T or reference_content<T>    internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); }    internal_type *      get_object()       { return static_cast<internal_type *>     (m_storage.address()); }    // reference_content<T> lacks an implicit conversion to T&, so the following is needed to obtain a proper reference.    reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }    reference_type       dereference( internal_type*       p, is_not_reference_tag )       { return *p ; }    reference_const_type dereference( internal_type const* p, is_reference_tag     ) const { return p->get() ; }    reference_type       dereference( internal_type*       p, is_reference_tag     )       { return p->get() ; }#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564)    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; }#else    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; }#endif    void destroy_impl ( is_reference_tag     ) { m_initialized = false ; }    // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.    // Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,    // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.    pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品系列在线播放| 国产精品久久久久久久久快鸭| 亚洲午夜在线观看视频在线| 91福利资源站| 亚洲不卡av一区二区三区| 欧美高清dvd| 麻豆极品一区二区三区| 欧美高清在线一区| 95精品视频在线| 亚洲欧洲性图库| 欧美婷婷六月丁香综合色| 日韩综合小视频| 久久精品欧美一区二区三区不卡| 成人黄色小视频| 亚洲一区二区影院| 欧美成人精品福利| 99久久婷婷国产| 婷婷激情综合网| 久久久精品蜜桃| 在线观看三级视频欧美| 看电视剧不卡顿的网站| 国产精品久久777777| 欧美另类高清zo欧美| 国产一区二区三区高清播放| 一区二区三区精品在线| 久久这里都是精品| 欧美无砖砖区免费| 国产一区二区三区四区在线观看 | 国产在线不卡视频| 亚洲精品大片www| 欧美精品一区二区久久婷婷| 99久久亚洲一区二区三区青草| 日韩电影在线免费观看| 成人免费在线视频观看| 日韩一区二区精品葵司在线| 91视频国产观看| 国模一区二区三区白浆| 香蕉久久夜色精品国产使用方法 | 91蜜桃网址入口| 韩国v欧美v亚洲v日本v| 亚洲妇熟xx妇色黄| 亚洲天堂精品在线观看| 久久九九久久九九| 日韩一区和二区| 欧美性极品少妇| 成人精品一区二区三区四区| 美女精品一区二区| 夜夜揉揉日日人人青青一国产精品| 久久久精品一品道一区| 欧美一卡2卡三卡4卡5免费| 色吧成人激情小说| 成人黄色在线网站| 国产精品综合一区二区三区| 日本免费在线视频不卡一不卡二| 亚洲sss视频在线视频| 中日韩av电影| 久久久综合精品| 日韩午夜小视频| 欧美日韩国产在线播放网站| 91社区在线播放| 成人黄色a**站在线观看| 国产福利一区二区| 精品一区二区三区久久| 日本中文在线一区| 日韩精品三区四区| 日韩av电影天堂| 日韩精品福利网| 天天综合天天做天天综合| 亚洲大片精品永久免费| 亚洲综合免费观看高清完整版 | 亚洲图片欧美激情| 国产精品不卡一区二区三区| 国产精品嫩草99a| 国产精品视频线看| 国产精品久久久久久一区二区三区 | 亚洲一区二区四区蜜桃| 一区二区三区久久久| 一区二区三区蜜桃| 亚洲超碰97人人做人人爱| 午夜久久久影院| 日韩电影一区二区三区四区| 免费在线观看一区| 韩国女主播成人在线| 国产九色sp调教91| 菠萝蜜视频在线观看一区| 91亚洲国产成人精品一区二区三| 99久久777色| 在线中文字幕一区二区| 欧美色图免费看| 欧美一二三区精品| 国产日韩欧美高清| 国产精品理论片| 亚洲高清免费观看| 久久99精品久久久久久| 国产成人高清视频| 91年精品国产| 91精品国产aⅴ一区二区| 精品久久久久久亚洲综合网| 久久久精品人体av艺术| 亚洲人成亚洲人成在线观看图片| 亚洲一区二区视频在线观看| 免费的成人av| va亚洲va日韩不卡在线观看| 精品视频一区二区不卡| 欧美岛国在线观看| 中文字幕精品三区| 亚洲人成人一区二区在线观看| 亚洲国产va精品久久久不卡综合| 日本在线不卡视频| 成人在线视频一区二区| 欧美日韩在线播放| 国产欧美一区二区三区鸳鸯浴| 一区二区三区久久| 国产精品一区免费视频| 一本色道久久综合狠狠躁的推荐| 欧美裸体一区二区三区| 国产日产欧美精品一区二区三区| 亚洲靠逼com| 国产一区二区h| 色8久久人人97超碰香蕉987| 日韩一区二区中文字幕| 亚洲同性同志一二三专区| 久色婷婷小香蕉久久| 色网综合在线观看| 久久精品在这里| 韩国成人精品a∨在线观看| 91丨porny丨蝌蚪视频| 欧美一卡2卡三卡4卡5免费| 亚洲欧美日韩国产综合在线| 国模少妇一区二区三区| 555www色欧美视频| 中文字幕一区二区不卡| 精油按摩中文字幕久久| 欧美亚洲国产bt| 国产精品剧情在线亚洲| 狠狠色综合色综合网络| 91精品国产日韩91久久久久久| 亚洲欧美综合另类在线卡通| 精品一区二区免费看| 欧美日韩激情在线| 亚洲精品视频自拍| 成人97人人超碰人人99| 久久久久久黄色| 奇米色一区二区| 欧美狂野另类xxxxoooo| 亚洲精品视频一区| 成人激情av网| 国产亚洲欧美色| 国产精品综合在线视频| 精品免费国产一区二区三区四区| 午夜国产精品影院在线观看| 91蝌蚪国产九色| 国产人成一区二区三区影院| 国产一区二区网址| 精品欧美乱码久久久久久1区2区| 日韩精品91亚洲二区在线观看| 在线观看精品一区| 亚洲另类在线制服丝袜| 一本久久精品一区二区| 亚洲麻豆国产自偷在线| 91在线观看一区二区| 亚洲欧美自拍偷拍色图| 91在线视频观看| 亚洲综合在线视频| 在线观看三级视频欧美| 亚洲一二三区不卡| 欧美人与性动xxxx| 日韩av一区二区在线影视| 日韩女优av电影| 国内外成人在线| 国产欧美视频一区二区| 波多野结衣中文字幕一区二区三区| 欧美激情一区二区三区全黄| 高清久久久久久| 亚洲色图清纯唯美| 日本韩国一区二区| 天天免费综合色| 精品99一区二区| 国产乱理伦片在线观看夜一区 | 91精品国产乱码| 美国av一区二区| 久久久一区二区三区| 国产河南妇女毛片精品久久久 | 欧美大黄免费观看| 韩国v欧美v亚洲v日本v| 国产精品情趣视频| 色婷婷精品久久二区二区蜜臀av| 亚洲国产精品一区二区尤物区| 欧美另类一区二区三区| 国产一区二区91| 亚洲精品综合在线| 欧美一区二区三区四区五区 | 丁香六月综合激情| 亚洲少妇30p| 欧美一区二区三区日韩| 国产综合久久久久久鬼色| 国产精品久久久久婷婷二区次| 欧美性一级生活| 国产一区在线观看麻豆| 亚洲欧美经典视频|