Boost C++ Libraries Boost.Bimap Home Libraries People FAQ More

PrevUpHomeNext

mutant idiom

A safe wrapper around reinterpret_cast. More...
template<class View, class Type>
BOOST_DEDUCED_TYPENAME enable_if<
mpl::not_< is_const< Type > >,
View & >::type 
mutate (Type &m)
 Converts a mutant class to a view with zero overhead.

Detailed Description

A safe wrapper around reinterpret_cast.


Function Documentation

BOOST_DEDUCED_TYPENAME enable_if< is_const< Type >, const View & >::type mutate ( Type &  m  ) 

Converts a mutant class to a view with zero overhead.

This function is a safe wrapper around reinterpret_cast. It checks at compile time that the desired view is supported by the mutant class. See also mutant, can_mutate_in.

Definition at line 54 of file mutant.hpp.

Copyright 2006 Matias Capeletto


PrevUpHomeNext