589: Add a temporary simple version of xtd_is_binary for use in oln.

2006-09-29 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr> Add a temporary simple version of xtd_is_binary for use in oln. * xtd/valtraits.hh: New. * xtd/Makefile.am (nobase_xtd_HEADERS): Update. Index: xtd/valtraits.hh =================================================================== --- xtd/valtraits.hh (revision 0) +++ xtd/valtraits.hh (revision 0) @@ -0,0 +1,61 @@ +// Copyright (C) 2006 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. + +#ifndef XTD_VALTRAITS_HH +# define XTD_VALTRAITS_HH + +// # include <xtd/traits.hh> +// # include <xtd/builtin/traits.hh> + + + +namespace xtd +{ + + template <typename T> + struct is_binary + { + typedef mlc::false_ ret; + }; + + + template <> + struct is_binary <bool> + { + typedef mlc::true_ ret; + }; + + +} // end of namespace xtd + + + +# define xtd_is_binary(T) typename xtd::is_binary<T>::ret + + + +#endif // ! XTD_VALTRAITS_HH Index: xtd/Makefile.am =================================================================== --- xtd/Makefile.am (revision 588) +++ xtd/Makefile.am (working copy) @@ -56,4 +56,5 @@ optraits.hh \ res.hh \ traits.hh \ + valtraits.hh \ vec.hh
participants (1)
-
Thierry GERAUD