uTL
micro Template library
operations.h File Reference

Integral constant operations and logical operations. More...

#include <utl/core/impl.h>
#include <utl/meta/selection.h>

Go to the source code of this file.

Classes

struct  utl::meta::detail::_or_<... >
 
struct  utl::meta::detail::_or_<>
 
struct  utl::meta::detail::_or_< _T1 >
 
struct  utl::meta::detail::_or_< _T1, _T2 >
 
struct  utl::meta::detail::_or_< _T1, _T2, _T3, _Tn... >
 
struct  utl::meta::detail::_and_<... >
 
struct  utl::meta::detail::_and_<>
 
struct  utl::meta::detail::_and_< _T1 >
 
struct  utl::meta::detail::_and_< _T1, _T2 >
 
struct  utl::meta::detail::_and_< _T1, _T2, _T3, _Tn... >
 
struct  utl::meta::same_< _T1, _T2 >
 
struct  utl::meta::same_< _Tp, _Tp >
 

Namespaces

 utl
 STL's core language concepts.
 
 utl::meta
 
 utl::meta::detail
 

Typedefs

template<bool B>
using utl::meta::not_c = bool_<!B >
 Negate the bool constant parameter. More...
 
template<typename _Tp >
using utl::meta::not_ = not_c< _Tp::type::value >
 not More...
 
template<typename... _Ts>
using utl::meta::or_ = eval< detail::_or_< _Ts... > >
 
template<typename... _Ts>
using utl::meta::and_ = eval< detail::_and_< _Ts... > >
 
template<typename _T1 , typename _T2 >
using utl::meta::not_same_ = not_< eval< same_< _T1, _T2 > >>
 
template<typename _Tp >
using utl::meta::negate = integral_< decltype(-_Tp()), -_Tp()>
 Negation. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::add = integral_< decltype(_Tp1()+_Tp2()), _Tp1()+_Tp2() >
 Addition. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::mult = integral_< decltype(_Tp2() *_Tp2()), _Tp1() *_Tp2() >
 Multiplication. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::divide = integral_< decltype(_Tp2()/_Tp2()), _Tp1()/_Tp2() >
 Division. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::modulo = integral_< decltype(_Tp1() % _Tp2()), _Tp1() % _Tp2() >
 Modulo. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::sub = add< _Tp1, negate< _Tp2 > >
 Substruction. More...
 
template<typename _Tp >
using utl::meta::inc = add< _Tp, int_< 1 > >
 Increase. More...
 
template<typename _Tp >
using utl::meta::dec = add< _Tp, int_<-1 > >
 decrease More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::comp_eq = bool_< _Tp1()==_Tp2()>
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::comp_lt = bool_<(_Tp1()< _Tp2())>
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::comp_ne = not_< comp_eq< _Tp1, _Tp2 > >
 Not equal. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::comp_gt = comp_lt< _Tp2, _Tp1 >
 Greater than. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::comp_le = not_< comp_lt< _Tp2, _Tp1 > >
 Less or equal. More...
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::comp_ge = not_< comp_lt< _Tp1, _Tp2 > >
 Greater or equal. More...
 
template<typename _T >
using utl::meta::bitnot_ = integral_< typename _T::value_type,(typename _T::value_type)(~_T())>
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::bitand_ = integral_< decltype(_Tp1() &_Tp2()), _Tp1() &_Tp2()>
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::bitor_ = integral_< decltype(_Tp1()|_Tp2()), _Tp1()|_Tp2()>
 
template<typename _Tp1 , typename _Tp2 >
using utl::meta::bitxor_ = integral_< decltype(_Tp1() ^ _Tp2()), _Tp1() ^ _Tp2()>
 
template<typename _Tp , typename shift >
using utl::meta::shift_left = integral_< typename _Tp::value_type,(typename _Tp::value_type)(_Tp()<< shift())>
 
template<typename _Tp , typename shift >
using utl::meta::shift_right = integral_< typename _Tp::value_type,(typename _Tp::value_type)(_Tp() > > shift())>
 

Detailed Description

Integral constant operations and logical operations.

Copyright (C) 2018-2019 Christos Choutouridis

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file operations.h.