mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add type_traits is_swappable, conjunction, disjunction, negation
This commit is contained in:
parent
913dc8ca44
commit
aa8e265188
18 changed files with 323 additions and 10 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -29,7 +30,6 @@
|
|||
#include <sprout/type_traits/identity.hpp>
|
||||
#include <sprout/detail/nil_base.hpp>
|
||||
#include <sprout/detail/static_size.hpp>
|
||||
#include <sprout/assert.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
|
@ -348,7 +348,7 @@ namespace sprout {
|
|||
{
|
||||
return i == 0 ? d.quot
|
||||
: i == 1 ? d.rem
|
||||
: (SPROUT_ASSERT(i < 2), d.quot)
|
||||
: (throw std::out_of_range("div_at: index out of range"), d.quot)
|
||||
;
|
||||
}
|
||||
template<typename Div>
|
||||
|
@ -358,7 +358,7 @@ namespace sprout {
|
|||
{
|
||||
return i == 0 ? d.quot
|
||||
: i == 1 ? d.rem
|
||||
: (SPROUT_ASSERT(i < 2), d.quot)
|
||||
: (throw std::out_of_range("div_at: index out of range"), d.quot)
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue