~ubuntu-branches/ubuntu/trusty/libthrust/trusty

« back to all changes in this revision

Viewing changes to detail/type_traits.h

  • Committer: Package Import Robot
  • Author(s): Andreas Beckmann
  • Date: 2011-12-02 01:48:24 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20111202014824-bpfczhbx39usefge
Tags: 1.5.0-1
* New upstream release.
* debian/copyright:
  - Update to dep5.mdwn?revision=202.
  - Update copyright entries for added/moved files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
{
384
384
}; // end or_
385
385
 
386
 
template <typename Condition1, typename Condition2>
 
386
template <typename Condition1, typename Condition2, typename Condition3 = true_type>
387
387
  struct and_
388
 
    : public integral_constant<bool, Condition1::value && Condition2::value>
 
388
    : public integral_constant<bool, Condition1::value && Condition2::value && Condition3::value>
389
389
{
390
390
}; // end and_
391
391
 
513
513
#endif
514
514
};
515
515
 
 
516
// T1 wins if they are both the same size
 
517
template<typename T1, typename T2>
 
518
  struct larger_type
 
519
    : thrust::detail::eval_if<
 
520
        (sizeof(T2) > sizeof(T1)),
 
521
        thrust::detail::identity_<T2>,
 
522
        thrust::detail::identity_<T1>
 
523
      >
 
524
{};
 
525
 
516
526
} // end detail
517
527
 
518
528
} // end thrust