src/Makefile.am, src/ltlast/Makefile.am, src/ltlast/allnodes.hh, src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh, src/ltlast/binop.cc, src/ltlast/binop.hh, src/ltlast/constant.cc, src/ltlast/constant.hh, src/ltlast/formulae.hh, src/ltlast/multop.cc, src/ltlast/multop.hh, src/ltlast/predecl.hh, src/ltlast/unop.cc, src/ltlast/unop.hh, src/ltlast/visitor.hh, src/ltlparse/Makefile.am, src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll, src/ltlparse/parsedecl.hh, src/ltlparse/public.hh, src/ltlvisit/Makefile.am, src/ltlvisit/dotty.cc, src/ltlvisit/dotty.hh, src/ltlvisit/dump.cc, src/ltlvisit/dump.hh, src/ltlvisit/rewrite.cc, src/ltlvisit/rewrite.hh, src/ltltest/Makefile.am, src/ltltest/defs.in, src/ltltest/readltl.cc, src/ltltest/parse.test, src/ltltest/parseerr.test, src/misc/Makefile.am, src/misc/const_sel.hh: New files.
28 lines
499 B
C++
28 lines
499 B
C++
#ifndef SPOT_MISC_CONSTSEL_HH
|
|
# define SPOT_MISC_CONSTSEL_HH
|
|
|
|
namespace spot
|
|
{
|
|
// Be default, define the type as-is.
|
|
template <class T, bool WantConst>
|
|
struct const_sel
|
|
{
|
|
typedef T t;
|
|
};
|
|
|
|
// If const is wanted, add it.
|
|
template <class T>
|
|
struct const_sel<T, true>
|
|
{
|
|
typedef const T t;
|
|
};
|
|
|
|
// If const is present but isn't wanted, remove it.
|
|
template <class T>
|
|
struct const_sel<const T, false>
|
|
{
|
|
typedef const T t;
|
|
};
|
|
}
|
|
|
|
#endif // SPOT_MISC_CONSTSEL_HH
|