Commit 4d84dc0c authored by Roland Levillain's avatar Roland Levillain
Browse files

Rename stc/scoop2.hh as stc/scoop-alt.hh.

	Encapsulate the contents of SCOOPED_NAMESPACE in
	stc_scoop_equipment_for_namespace.

	* stc/scoop2.hh: Rename as...
	* stc/scoop-alt.hh: ...this.
	Adjust header guards.
	(ERROR::IN_find__VIRTUAL_TYPE_IS_ABSTRACT)
	(ERROR::IN_find_local__VIRTUAL_TYPE_MULTIPLY_DEFINED)
	(ERROR::IN_merge2__FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge2__FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
	(ERROR::IN_merge2__FINAL_VIRTUAL_TYPE_REDEFINED)
	(ERROR::IN_merge2__VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge3__FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge3__VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge3__LOCAL_DECLARATION_OF_NOT_DELEGATED_AND_ABSTRACT)
	(ERROR::IN_merge3__FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
	(ERROR::IN_merge3__FINAL_VIRTUAL_TYPE_REDEFINED): Rename as...
	(ERROR::IN_find_VIRTUAL_TYPE_IS_ABSTRACT)
	(ERROR::IN_find_local_VIRTUAL_TYPE_MULTIPLY_DEFINED)
	(ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
	(ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED)
	(ERROR::IN_merge2_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge3_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
	(ERROR::IN_merge3_LOCAL_DECLARATION_OF_NOT_DELEGATED_AND_ABSTRACT)
	(ERROR::IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
	(ERROR::IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED): ...these.
	(SCOOPED_NAMESPACE): Remove macro.
	(stc_scoop_equipment_for_namespace): New macro.
	Encapsulate the contents of SCOOPED_NAMESPACE within this macro.
	(stc_match_pair_0p_with, stc_match_pair_1p_with)
	(stc_match_pair_2p_with, stc_match_pair_1p_with_error)
	(stc_match_pair_2p_with_error)
	(stc_match_triple_0p_with, stc_match_triple_1p_with)
	(stc_match_triple_2p_with, stc_match_triple_3p_with)
	(stc_match_triple_2p_with_error, stc_match_triple_3p_with_error):
	Move and rename these macros as..
	* stc/internal/match-with.hh (stc_internal_match_pair_0p_with)
	(stc_internal_match_pair_1p_with, stc_internal_match_pair_2p_with)
	(stc_internal_match_pair_1p_with_error)
	(stc_internal_match_pair_2p_with_error)
	(stc_internal_match_triple_0p_with)
	(stc_internal_match_triple_1p_with)
	(stc_internal_match_triple_2p_with)
	(stc_internal_match_triple_3p_with)
	(stc_internal_match_triple_2p_with_error)
	(stc_internal_match_triple_3p_with_error): ...these (new file).
	* stc/Makefile (nobase_stc_HEADERS): Remove scoop2.hh.
	Add scoop-alt.hh and internal/match-with.hh.

	* tests/scoop2.cc: Rename as...
	* tests/scoop-alt.cc: ...this.
	Adjust.
	(stc_scoop_equipment_for_namespace): Invoke it.
	* tests/super.cc (my::set_pseudosuper_type<C>): Remove.
	(my::vtypes<C>::delegatee_type): New.
	* tests/Makefile.am (nobase_stc_HEADERS): Add
	internal/match-with.hh.
	(scoop2_SOURCES): Remove.
	(scoop_alt_SOURCES): New.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@726 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent eeb74355
2007-01-30 Roland Levillain <roland@lrde.epita.fr>
Rename stc/scoop2.hh as stc/scoop-alt.hh.
Encapsulate the contents of SCOOPED_NAMESPACE in
stc_scoop_equipment_for_namespace.
* stc/scoop2.hh: Rename as...
* stc/scoop-alt.hh: ...this.
Adjust header guards.
(ERROR::IN_find__VIRTUAL_TYPE_IS_ABSTRACT)
(ERROR::IN_find_local__VIRTUAL_TYPE_MULTIPLY_DEFINED)
(ERROR::IN_merge2__FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge2__FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
(ERROR::IN_merge2__FINAL_VIRTUAL_TYPE_REDEFINED)
(ERROR::IN_merge2__VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge3__FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge3__VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge3__LOCAL_DECLARATION_OF_NOT_DELEGATED_AND_ABSTRACT)
(ERROR::IN_merge3__FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
(ERROR::IN_merge3__FINAL_VIRTUAL_TYPE_REDEFINED): Rename as...
(ERROR::IN_find_VIRTUAL_TYPE_IS_ABSTRACT)
(ERROR::IN_find_local_VIRTUAL_TYPE_MULTIPLY_DEFINED)
(ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
(ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED)
(ERROR::IN_merge2_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge3_VIRTUAL_TYPE_REDEFINED_ABSTRACT)
(ERROR::IN_merge3_LOCAL_DECLARATION_OF_NOT_DELEGATED_AND_ABSTRACT)
(ERROR::IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED_FINAL)
(ERROR::IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED): ...these.
(SCOOPED_NAMESPACE): Remove macro.
(stc_scoop_equipment_for_namespace): New macro.
Encapsulate the contents of SCOOPED_NAMESPACE within this macro.
(stc_match_pair_0p_with, stc_match_pair_1p_with)
(stc_match_pair_2p_with, stc_match_pair_1p_with_error)
(stc_match_pair_2p_with_error)
(stc_match_triple_0p_with, stc_match_triple_1p_with)
(stc_match_triple_2p_with, stc_match_triple_3p_with)
(stc_match_triple_2p_with_error, stc_match_triple_3p_with_error):
Move and rename these macros as..
* stc/internal/match-with.hh (stc_internal_match_pair_0p_with)
(stc_internal_match_pair_1p_with, stc_internal_match_pair_2p_with)
(stc_internal_match_pair_1p_with_error)
(stc_internal_match_pair_2p_with_error)
(stc_internal_match_triple_0p_with)
(stc_internal_match_triple_1p_with)
(stc_internal_match_triple_2p_with)
(stc_internal_match_triple_3p_with)
(stc_internal_match_triple_2p_with_error)
(stc_internal_match_triple_3p_with_error): ...these (new file).
* stc/Makefile (nobase_stc_HEADERS): Remove scoop2.hh.
Add scoop-alt.hh and internal/match-with.hh.
* tests/scoop2.cc: Rename as...
* tests/scoop-alt.cc: ...this.
Adjust.
(stc_scoop_equipment_for_namespace): Invoke it.
* tests/super.cc (my::set_pseudosuper_type<C>): Remove.
(my::vtypes<C>::delegatee_type): New.
* tests/Makefile.am (nobase_stc_HEADERS): Add
internal/match-with.hh.
(scoop2_SOURCES): Remove.
(scoop_alt_SOURCES): New.
2007-01-30 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
Add mini-std.
......
......@@ -7,11 +7,11 @@ nobase_stc_HEADERS = \
exact.hh \
find_exact.hh \
scoop.hh \
scoop-alt.hh \
valist_aggregator.hh \
\
internal/extract_vtype_from_list.hh \
\
scoop2.hh
internal/match-with.hh
# Old code.
EXTRA_DIST = was.scoop.hh
// Copyright (C) 2005, 2006, 2007 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License version 2 as published by the
// Free Software Foundation.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this library; see the file COPYING. If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02111-1307, USA.
//
// As a special exception, you may use this file as part of a free
// software library without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to
// produce an executable, this file does not by itself cause the
// resulting executable to be covered by the GNU General Public
// License. This exception does not however invalidate any other
// reasons why the executable file might be covered by the GNU General
// Public License.
/* \file stc/match-with.hh
\brief Internal helpers for stc/scoop-alt.hh.
This file contains helpers that mimic a ``match-with'' (pattern
matching) construct from many functional languages. */
#ifndef STC_INTERNAL_MATCH_WITH_HH
# define STC_INTERNAL_MATCH_WITH_HH
/*-----------------.
| merge2 helpers. |
`-----------------*/
/* Shortcuts macros. */
#define stc_internal_match_pair_0p_with(Local, Super, Res) \
template <> \
struct match_with< Local, Super > \
{ \
typedef Res ret; \
}
#define stc_internal_match_pair_1p_with(T1, Local, Super, Res) \
template < typename T1 > \
struct match_with< Local, Super > \
{ \
typedef Res ret; \
}
#define stc_internal_match_pair_2p_with(T1, T2, Local, Super, Res) \
template < typename T1, typename T2 > \
struct match_with< Local, Super > \
{ \
typedef Res ret; \
}
/* Erroneous cases. */
#define stc_internal_match_pair_1p_with_error(T1, Local, Super, Msg) \
template < typename T1 > \
struct match_with< Local, Super > : \
mlc::abort_< T1, Msg > \
{ \
}
#define stc_internal_match_pair_2p_with_error(T1, T2, Local, Super, Msg) \
template < typename T1, typename T2 > \
struct match_with< Local, Super > : \
mlc::abort_< T2, Msg > \
{ \
}
/*-----------------.
| merge3 helpers. |
`-----------------*/
/* Shortcuts macros. */
#define stc_internal_match_triple_0p_with(Local, Super, Deleg, Res) \
template <> \
struct match_with< Local, Super, Deleg > \
{ \
typedef Res ret; \
}
#define stc_internal_match_triple_1p_with(T1, Local, Super, Deleg, Res) \
template < typename T1 > \
struct match_with< Local, Super, Deleg > \
{ \
typedef Res ret; \
}
#define stc_internal_match_triple_2p_with(T1, T2, Local, Super, Deleg, Res) \
template < typename T1, typename T2 > \
struct match_with< Local, Super, Deleg > \
{ \
typedef Res ret; \
}
#define stc_internal_match_triple_3p_with(T1, T2, T3, Local, Super, Deleg, Res) \
template < typename T1, typename T2, typename T3 > \
struct match_with< Local, Super, Deleg > \
{ \
typedef Res ret; \
}
/* Erroneous cases. */
#define stc_internal_match_triple_2p_with_error(T1, T2, Local, Super, Deleg, Msg) \
template < typename T1, typename T2 > \
struct match_with< Local, Super, Deleg > : \
mlc::abort_< T2, Msg > \
{ \
}
#define stc_internal_match_triple_3p_with_error(T1, T2, T3, Local, Super, Deleg, Msg) \
template < typename T1, typename T2, typename T3 > \
struct match_with< Local, Super, Deleg > : \
mlc::abort_< T3, Msg > \
{ \
}
#endif // ! STC_INTERNAL_MATCH_WITH_HH
// Copyright (C) 2005, 2006, 2007 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License version 2 as published by the
// Free Software Foundation.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this library; see the file COPYING. If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02111-1307, USA.
//
// As a special exception, you may use this file as part of a free
// software library without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to
// produce an executable, this file does not by itself cause the
// resulting executable to be covered by the GNU General Public
// License. This exception does not however invalidate any other
// reasons why the executable file might be covered by the GNU General
// Public License.
/* \file stc/scoop-alt.hh
\brief Alternative equipment for SCOOP 2 (in particular, virtual
types). */
#ifndef STC_SCOOP_ALT_HH
# define STC_SCOOP_ALT_HH
# include <mlc/flags.hh>
# include <mlc/typedef.hh>
# include <mlc/abort.hh>
# include <stc/internal/match-with.hh>
namespace stc
{
/* FIXME: Define a real stc::none, instead of making it an alias of
mlc::none. For compatibility purpose with the current
implementation of the SCOOP 2 paradigm (see stc/scoop.hh), we
need to have stc::none be equal to mlc::none. */
#if 0
struct none {};
#endif
using mlc::none;
struct not_found;
struct abstract;
struct not_delegated;
struct not_delegated_abstract;
template <typename T> struct final;
/// \brief Shortcuts for comparison with stc::not_found.
///
/// Duplicate with their Metalic's homonyms, but still useful, since
/// they deal with std::not_found (not mlc::not_found).
/// \{
template <typename T>
struct is_not_found_ : public mlc_is_a(T, stc::not_found)::bexpr
{
};
template <typename T>
struct is_found_ : public mlc_is_not_a(T, stc::not_found)::bexpr
{
};
/// \}
namespace ERROR
{
struct IN_find_VIRTUAL_TYPE_IS_ABSTRACT;
struct IN_find_local_VIRTUAL_TYPE_MULTIPLY_DEFINED;
struct IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT;
struct IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_FINAL;
struct IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED;
struct IN_merge2_VIRTUAL_TYPE_REDEFINED_ABSTRACT;
struct IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT;
struct IN_merge3_VIRTUAL_TYPE_REDEFINED_ABSTRACT;
struct IN_merge3_LOCAL_DECLARATION_OF_NOT_DELEGATED_AND_ABSTRACT;
struct IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED_FINAL;
struct IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED;
} // end of namespace ERROR
} // end of namespace stc
#define stc_super(T) typename set_super_type< T >::ret
// Based on doc/algorithm.ml.
#define stc_scoop_equipment_for_namespace(SCOOPED_NAMESPACE) \
\
namespace SCOOPED_NAMESPACE \
{ \
\
/* Declare delegatee_type. */ \
mlc_decl_typedef(delegatee_type); \
\
\
template <typename class_name> \
struct set_super_type \
{ \
}; \
\
template <typename class_name> \
struct vtypes \
{ \
}; \
\
template <typename class_name, typename type_name> \
struct single_vtype \
{ \
typedef mlc::not_found ret; \
}; \
\
/* ----------------------------------------------------- find_local. */ \
\
/* Highly inspired from Tho's get_stm! */ \
\
namespace find_local_ \
{ \
/* Forward declaration. */ \
template <typename T, typename U> struct match_with; \
\
template <typename T> \
struct match_with <T, mlc::not_found> \
{ \
typedef T ret; \
}; \
\
template <typename U> \
struct match_with <mlc::not_found, U> \
{ \
typedef U ret; \
}; \
\
template <> \
struct match_with <mlc::not_found, mlc::not_found> \
{ \
typedef stc::not_found ret; \
}; \
\
template <typename T, typename U> \
struct match_with : \
mlc::abort_<T, \
stc::ERROR::IN_find_local_VIRTUAL_TYPE_MULTIPLY_DEFINED> \
{ \
}; \
\
} /* end of namespace find_local_ */ \
\
template <typename source, typename target> \
struct find_local \
{ \
typedef SCOOPED_NAMESPACE::vtypes<source> decl1; \
typedef typename target::template from_<decl1>::ret res1; \
\
typedef SCOOPED_NAMESPACE::single_vtype<source, target> decl2; \
typedef typename decl2::ret ret2; \
\
\
/* Result. */ \
typedef typename find_local_::match_with<res1, ret2>::ret ret; \
}; \
\
\
/* --------------------------------------------------------- merge2. */ \
\
\
namespace merge2_ \
{ \
/* Forward declaration. */ \
template <typename T, typename U> struct match_with; \
\
\
/* ----------------------------- */ \
/* local_res == stc::not_found. */ \
/* ----------------------------- */ \
\
stc_internal_match_pair_0p_with(stc::not_found, stc::not_found, \
stc::not_found); \
\
stc_internal_match_pair_0p_with(stc::not_found, stc::abstract, \
stc::not_found); \
\
stc_internal_match_pair_1p_with(U, \
stc::not_found, stc::final<U>, \
stc::final<U>); \
\
stc_internal_match_pair_1p_with(U, \
stc::not_found, U, \
U); \
\
\
/* ---------------------------- */ \
/* local_res == stc::abstract. */ \
/* ---------------------------- */ \
\
stc_internal_match_pair_0p_with(stc::abstract, stc::not_found, \
stc::abstract); \
\
stc_internal_match_pair_0p_with(stc::abstract, stc::abstract, \
stc::abstract); \
\
stc_internal_match_pair_1p_with_error(U, \
stc::abstract, stc::final<U>, \
stc::ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT); \
\
stc_internal_match_pair_1p_with_error(U, \
stc::abstract, U, \
stc::ERROR::IN_merge2_VIRTUAL_TYPE_REDEFINED_ABSTRACT); \
\
\
/* ---------------------------- */ \
/* local_res == stc::final<T>. */ \
/* ---------------------------- */ \
\
stc_internal_match_pair_1p_with(T, \
stc::final<T>, stc::not_found, \
stc::final<T>); \
\
stc_internal_match_pair_1p_with(T, \
stc::final<T>, stc::abstract, \
stc::final<T>); \
\
stc_internal_match_pair_2p_with_error(T, U, \
stc::final<T>, stc::final<U>, \
stc::ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED_FINAL); \
\
stc_internal_match_pair_2p_with(T, U, \
stc::final<T>, U, \
stc::final<T>); \
\
\
/* ---------------- */ \
/* local_res == T. */ \
/* ---------------- */ \
\
stc_internal_match_pair_1p_with(T, \
T, stc::not_found, \
T); \
\
stc_internal_match_pair_1p_with(T, \
T, stc::abstract, \
T); \
\
stc_internal_match_pair_2p_with_error(T, U, \
T, stc::final<U>, \
stc::ERROR::IN_merge2_FINAL_VIRTUAL_TYPE_REDEFINED); \
\
template <typename T, typename U> \
struct match_with \
{ \
typedef T ret; \
}; \
\
} /* end of namespace merge2_ */ \
\
template <typename local_res, typename super_res> \
struct merge2 \
{ \
/* Result. */ \
typedef typename merge2_::match_with<local_res, super_res>::ret ret; \
}; \
\
\
/* --------------------------------------------------------- merge3. */ \
\
\
namespace merge3_ \
{ \
/* Forward declaration. */ \
template <typename T, typename U, typename V> struct match_with; \
\
\
/* ----------------------------- */ \
/* local_res == stc::not_found. */ \
/* ----------------------------- */ \
\
/* super_res == stc::not_found. */ \
stc_internal_match_triple_0p_with( \
stc::not_found, stc::not_found, stc::not_found, \
stc::not_found); \
\
stc_internal_match_triple_0p_with( \
stc::not_found, stc::not_found, stc::abstract, \
stc::not_found); \
\
stc_internal_match_triple_1p_with(V, \
stc::not_found, stc::not_found, stc::final<V>, \
stc::final<V>); \
\
stc_internal_match_triple_1p_with(V, \
stc::not_found, stc::not_found, V, \
V); \
\
/* super_res == stc::abstract. */ \
stc_internal_match_triple_0p_with( \
stc::not_found, stc::abstract, stc::not_found, \
stc::not_found); \
\
stc_internal_match_triple_0p_with( \
stc::not_found, stc::abstract, stc::abstract, \
stc::abstract); \
\
stc_internal_match_triple_1p_with(V, \
stc::not_found, stc::abstract, stc::final<V>, \
stc::final<V>); \
\
stc_internal_match_triple_1p_with(V, \
stc::not_found, stc::abstract, V, \
V); \
\
/* super_res is a concrete type. */ \
stc_internal_match_triple_2p_with(U, V, \
stc::not_found, stc::final<U>, V, \
stc::final<U>); \
\
stc_internal_match_triple_2p_with(U, V, \
stc::not_found, U, V, \
U); \
\
\
/* ---------------------------- */ \
/* local_res == stc::abstract. */ \
/* ---------------------------- */ \
\
/* super_res == stc::not_found. */ \
stc_internal_match_triple_0p_with( \
stc::abstract, stc::not_found, stc::not_found, \
stc::abstract); \
\
stc_internal_match_triple_0p_with( \
stc::abstract, stc::not_found, stc::abstract, \
stc::abstract); \
\
stc_internal_match_triple_1p_with(V, \
stc::abstract, stc::not_found, stc::final<V>, \
stc::final<V>); \
\
stc_internal_match_triple_1p_with(V, \
stc::abstract, stc::not_found, V, \
V); \
\
\
/* super_res == stc::abstract. */ \
stc_internal_match_triple_0p_with( \
stc::abstract, stc::abstract, stc::not_found, \
stc::abstract); \
\
stc_internal_match_triple_0p_with( \
stc::abstract, stc::abstract, stc::abstract, \
stc::abstract); \
\
stc_internal_match_triple_1p_with(V, \
stc::abstract, stc::abstract, stc::final<V>, \
stc::final<V>); \
\
stc_internal_match_triple_1p_with(V, \
stc::abstract, stc::abstract, V, \
V); \
\
\
/* super_res == stc::not_delegated_abstract. */ \
stc_internal_match_triple_1p_with(V, \
stc::abstract, stc::not_delegated_abstract, V, \
stc::not_delegated_abstract); \
\
stc_internal_match_triple_1p_with(V, \
stc::abstract, stc::not_delegated, V, \
stc::not_delegated_abstract); \
\
\
/* super_res is a concrete type. */ \
stc_internal_match_triple_2p_with_error(U, V, \
stc::abstract, stc::final<U>, V, \
stc::ERROR::IN_merge3_FINAL_VIRTUAL_TYPE_REDEFINED_ABSTRACT); \
\
stc_internal_match_triple_2p_with_error(U, V, \
stc::abstract, U, V, \
stc::ERROR::IN_merge3_VIRTUAL_TYPE_REDEFINED_ABSTRACT); \
\
\
/* --------------------------------- */ \
/* local_res == stc::not_delegated. */ \
/* --------------------------------- */ \
\
stc_internal_match_triple_1p_with(V, \
stc::not_delegated, stc::not_found, V, \
stc::not_delegated); \
\
stc_internal_match_triple_1p_with(V, \
stc::not_delegated, stc::abstract, V, \
stc::not_delegated_abstract); \
\
stc_internal_match_triple_1p_with(V, \
stc::not_delegated, stc::not_delegated_abstract, V, \
stc::not_delegated_abstract); \
\
\
/* ------------------------------------------ */ \
/* local_res == stc::not_delegated_abstract. */ \
/* ------------------------------------------ */ \
\
/* FIXME: Shouldn't we introduce a means to tag a vtype both as */ \
/* abstract *and* not delegated? (Currently, the rule below */ \
/* prevents this). */ \
stc_internal_match_triple_2p_with_error(U, V, \
stc::not_delegated_abstract, U, V, \
stc::ERROR::IN_merge3_LOCAL_DECLARATION_OF_NOT_DELEGATED_AND_ABSTRACT); \
\
\
/* ---------------------------- */ \