Commit 43e75200 authored by Thierry Geraud's avatar Thierry Geraud
Browse files

Tiny fix.

	* mlc/typedef.hh (result): Rename as...
	(result_): ...this; disambiguation.
	* mlc/cmp.hh (assert_found_),
	(assert_not_found_): New.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@867 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 21d16acf
2007-03-13 Thierry Geraud <thierry.geraud@lrde.epita.fr>
Tiny fix.
* mlc/typedef.hh (result): Rename as...
(result_): ...this; disambiguation.
* mlc/cmp.hh (assert_found_),
(assert_not_found_): New.
2007-02-01 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
* mlc/case.hh (mlc_case_equipment_for_namespace):
......
......@@ -161,6 +161,16 @@ namespace mlc
struct is_found_ : public mlc_is_not_a(T, mlc::not_found)::bexpr
{
};
template <typename T, typename err = no_error_message>
struct assert_found_ : public assert_< is_found_<T>, err >
{
};
template <typename T, typename err = no_error_message>
struct assert_not_found_ : public assert_< is_not_found_<T>, err >
{
};
/// \}
......
......@@ -161,29 +161,29 @@ namespace typedef_ { \
static no selector(...); \
\
template <class T, bool found_> \
struct result; \
struct result_; \
\
template <class T> \
struct result <T, true> { \
struct result_ <T, true> { \
typedef typename T::TypedefName ret; \
}; \
\
template <class T> \
struct result <T, false> { \
struct result_ <T, false> { \
typedef mlc::not_found ret; \
}; \
\
template <class T, bool found_> \
struct result2; \
struct result_2; \
\
template <class T> \
struct result2 <T, true> { \
struct result_2 <T, true> { \
typedef mlc::pair_<mlc::found, \
typename T::TypedefName> ret; \
}; \
\
template <class T> \
struct result2 <T, false> { \
struct result_2 <T, false> { \
typedef mlc::pair_<mlc::not_found, \
mlc::dummy> ret; \
}; \
......@@ -205,11 +205,11 @@ namespace typedef_ { \
}; \
public: \
typedef \
typename helper_::result<T, found_>::ret \
typename helper_::result_<T, found_>::ret \
ret; \
\
typedef \
typename helper_::result2<T, found_>::ret \
typename helper_::result_2<T, found_>::ret \
ret2; \
}; \
\
......@@ -235,7 +235,7 @@ namespace typedef_ { \
\
} \
\
struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n \
struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
/*! \macro mlc_typedef(Type, TypedefName)
......
Supports Markdown
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