/* Copyright 2015, 2016, Michele Santullo * This file is part of "dindexer". * * "dindexer" is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * "dindexer" 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 "dindexer". If not, see . */ #ifndef id942A6B5AB2AF443C82D4321775BFC9E8 #define id942A6B5AB2AF443C82D4321775BFC9E8 #include "compatibility.h" #include "helpers/sequence_bt.hpp" #include "helpers/MaxSizedArray.hpp" #include #include #include #include #include #include #include #include #include #include #include namespace dinhelp { namespace customize { template struct index_array_to_string; template struct char_to_int; } //namespace customize namespace implem { template typename std::make_unsigned::type abs ( T parValue ) a_pure; template int count_leading_zeroes ( typename std::enable_if::is_signed, T>::type parValue ) a_always_inline; template int count_leading_zeroes ( typename std::enable_if::is_signed, T>::type parValue ) a_always_inline; int count_leading_zeroes_overload ( unsigned char parValue ) a_always_inline; int count_leading_zeroes_overload ( unsigned short int parValue ) a_always_inline; int count_leading_zeroes_overload ( unsigned int parValue ) a_always_inline; int count_leading_zeroes_overload ( unsigned long parValue ) a_always_inline; int count_leading_zeroes_overload ( unsigned long long parValue ) a_always_inline; template struct power { enum { value = Base * power::value }; }; template struct power { enum { value = 1 }; }; template ::is_signed> struct is_negative; template struct is_negative { static int check (T parValue) { return (parValue < 0 ? 1 : 0); } }; template struct is_negative { static constexpr int check (T) { return 0; } }; template