Changeset 44662


Ignore:
Timestamp:
Apr 21, 2008, 1:23:42 AM (10 years ago)
Author:
chris_kohlhoff
Message:

Add ability to disable the uses of the typeid operator by defining
BOOST_NO_TYPEID or BOOST_ASIO_NO_TYPEID.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/asio/detail/service_registry.hpp

    r43472 r44662  
    2727#include <boost/asio/detail/noncopyable.hpp>
    2828#include <boost/asio/detail/service_id.hpp>
     29
     30#if defined(BOOST_NO_TYPEID)
     31# if !defined(BOOST_ASIO_NO_TYPEID)
     32#  define BOOST_ASIO_NO_TYPEID
     33# endif // !defined(BOOST_ASIO_NO_TYPEID)
     34#endif // defined(BOOST_NO_TYPEID)
    2935
    3036namespace boost {
     
    158164  }
    159165
     166#if !defined(BOOST_ASIO_NO_TYPEID)
    160167  // Set a service's id.
    161168  template <typename Service>
     
    166173    service.id_ = 0;
    167174  }
     175#endif // !defined(BOOST_ASIO_NO_TYPEID)
    168176
    169177  // Check if a service matches the given id.
     
    175183  }
    176184
     185#if !defined(BOOST_ASIO_NO_TYPEID)
    177186  // Check if a service matches the given id.
    178187  template <typename Service>
     
    183192    return service.type_info_ != 0 && *service.type_info_ == typeid(Service);
    184193  }
     194#endif // !defined(BOOST_ASIO_NO_TYPEID)
    185195
    186196  // Mutex to protect access to internal data.
  • trunk/libs/asio/doc/using.qbk

    r43473 r44662  
    256256    ]
    257257  ]
     258  [
     259    [`BOOST_ASIO_NO_TYPEID`]
     260    [
     261      Disables uses of the `typeid` operator in Boost.Asio. Defined
     262      automatically if `BOOST_NO_TYPEID` is defined.
     263    ]
     264  ]
    258265]
    259266
Note: See TracChangeset for help on using the changeset viewer.