Commit d9bbe6c6 authored by Bednárek David RNDr. Ph.D.'s avatar Bednárek David RNDr. Ph.D.
Browse files

improved doxygenation for safe_ptr

parent 6622cca4
......@@ -88,6 +88,7 @@ namespace cecko {
extern err_def_n INCOMPATIBLE; ///< Incompatible operands
extern err_def_n INVALID_FUNCTION_TYPE; ///< Invalid function type constructed
extern err_def_n INVALID_ARRAY_TYPE; ///< Invalid array type constructed
/// @cond INTERNAL
extern err_def_n INVALID_VARIABLE_TYPE; ///< Invalid variable type (reported by the framework)
/// @endcond
......
......@@ -36,12 +36,20 @@ A wrapper over LLVM IR.
namespace cecko {
/// @cond INTERNAL
template< typename E>
struct safe_default
{
E operator()() const { return E(); }
};
/// @endcond
/// @brief Safe pointer to E
///
/// No crashes: When the value is nullptr, * and -> returns a dummy object responding to all member functions.
/// No random values: Initialized to nullptr.
/// Automatic conversion to E*.
/// Explicit conversion from E*.
template< typename E, typename DF = safe_default<E>>
class safe_ptr
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment