~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to system/include/libcxx/functional

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
    // invoke
58
58
    template <class... ArgTypes>
59
 
      typename result_of<T(ArgTypes...)>::type
 
59
      typename result_of<T&(ArgTypes&&...)>::type
60
60
          operator() (ArgTypes&&...) const;
61
61
};
62
62
 
358
358
template <class S, class T, class A> const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
359
359
 
360
360
template<class R, class T> unspecified mem_fn(R T::*);
361
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...));
362
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const);
363
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile);
364
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile);
365
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) &);
366
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const &);
367
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile &);
368
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile &);
369
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) &&);
370
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const &&);
371
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) volatile &&);
372
 
template<class R, class T, class... Args> unspecified mem_fn(R (T::*)(Args...) const volatile &&);
373
361
 
374
362
class bad_function_call
375
363
    : public exception
502
490
#else
503
491
template <class _Tp>
504
492
#endif
505
 
struct _LIBCPP_TYPE_VIS plus : binary_function<_Tp, _Tp, _Tp>
 
493
struct _LIBCPP_TYPE_VIS_ONLY plus : binary_function<_Tp, _Tp, _Tp>
506
494
{
507
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
495
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
496
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
508
497
        {return __x + __y;}
509
498
};
510
499
 
511
500
#if _LIBCPP_STD_VER > 11
512
501
template <>
513
 
struct _LIBCPP_TYPE_VIS plus<void>
 
502
struct _LIBCPP_TYPE_VIS_ONLY plus<void>
514
503
{
515
504
    template <class _T1, class _T2>
516
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const
 
505
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
506
    auto operator()(_T1&& __t, _T2&& __u) const
517
507
        { return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
 
508
    typedef void is_transparent;
518
509
};
519
510
#endif
520
511
 
524
515
#else
525
516
template <class _Tp>
526
517
#endif
527
 
struct _LIBCPP_TYPE_VIS minus : binary_function<_Tp, _Tp, _Tp>
 
518
struct _LIBCPP_TYPE_VIS_ONLY minus : binary_function<_Tp, _Tp, _Tp>
528
519
{
529
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
520
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
521
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
530
522
        {return __x - __y;}
531
523
};
532
524
 
533
525
#if _LIBCPP_STD_VER > 11
534
526
template <>
535
 
struct _LIBCPP_TYPE_VIS minus<void>
 
527
struct _LIBCPP_TYPE_VIS_ONLY minus<void>
536
528
{
537
529
    template <class _T1, class _T2>
538
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const
 
530
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
531
    auto operator()(_T1&& __t, _T2&& __u) const
539
532
        { return _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); }
 
533
    typedef void is_transparent;
540
534
};
541
535
#endif
542
536
 
546
540
#else
547
541
template <class _Tp>
548
542
#endif
549
 
struct _LIBCPP_TYPE_VIS multiplies : binary_function<_Tp, _Tp, _Tp>
 
543
struct _LIBCPP_TYPE_VIS_ONLY multiplies : binary_function<_Tp, _Tp, _Tp>
550
544
{
551
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
545
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
546
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
552
547
        {return __x * __y;}
553
548
};
554
549
 
555
550
#if _LIBCPP_STD_VER > 11
556
551
template <>
557
 
struct _LIBCPP_TYPE_VIS multiplies<void>
 
552
struct _LIBCPP_TYPE_VIS_ONLY multiplies<void>
558
553
{
559
554
    template <class _T1, class _T2>
560
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const
 
555
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
556
    auto operator()(_T1&& __t, _T2&& __u) const
561
557
        { return _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); }
 
558
    typedef void is_transparent;
562
559
};
563
560
#endif
564
561
 
568
565
#else
569
566
template <class _Tp>
570
567
#endif
571
 
struct _LIBCPP_TYPE_VIS divides : binary_function<_Tp, _Tp, _Tp>
 
568
struct _LIBCPP_TYPE_VIS_ONLY divides : binary_function<_Tp, _Tp, _Tp>
572
569
{
573
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
570
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
571
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
574
572
        {return __x / __y;}
575
573
};
576
574
 
577
575
#if _LIBCPP_STD_VER > 11
578
576
template <>
579
 
struct _LIBCPP_TYPE_VIS divides<void>
 
577
struct _LIBCPP_TYPE_VIS_ONLY divides<void>
580
578
{
581
579
    template <class _T1, class _T2>
582
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const
 
580
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
581
    auto operator()(_T1&& __t, _T2&& __u) const
583
582
        { return _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); }
 
583
    typedef void is_transparent;
584
584
};
585
585
#endif
586
586
 
590
590
#else
591
591
template <class _Tp>
592
592
#endif
593
 
struct _LIBCPP_TYPE_VIS modulus : binary_function<_Tp, _Tp, _Tp>
 
593
struct _LIBCPP_TYPE_VIS_ONLY modulus : binary_function<_Tp, _Tp, _Tp>
594
594
{
595
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
595
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
596
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
596
597
        {return __x % __y;}
597
598
};
598
599
 
599
600
#if _LIBCPP_STD_VER > 11
600
601
template <>
601
 
struct _LIBCPP_TYPE_VIS modulus<void>
 
602
struct _LIBCPP_TYPE_VIS_ONLY modulus<void>
602
603
{
603
604
    template <class _T1, class _T2>
604
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const
 
605
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
606
    auto operator()(_T1&& __t, _T2&& __u) const
605
607
        { return _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); }
 
608
    typedef void is_transparent;
606
609
};
607
610
#endif
608
611
 
612
615
#else
613
616
template <class _Tp>
614
617
#endif
615
 
struct _LIBCPP_TYPE_VIS negate : unary_function<_Tp, _Tp>
 
618
struct _LIBCPP_TYPE_VIS_ONLY negate : unary_function<_Tp, _Tp>
616
619
{
617
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x) const
 
620
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
621
    _Tp operator()(const _Tp& __x) const
618
622
        {return -__x;}
619
623
};
620
624
 
621
625
#if _LIBCPP_STD_VER > 11
622
626
template <>
623
 
struct _LIBCPP_TYPE_VIS negate<void>
 
627
struct _LIBCPP_TYPE_VIS_ONLY negate<void>
624
628
{
625
629
    template <class _Tp>
626
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_Tp&& __x) const
 
630
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
631
    auto operator()(_Tp&& __x) const
627
632
        { return -_VSTD::forward<_Tp>(__x); }
 
633
    typedef void is_transparent;
628
634
};
629
635
#endif
630
636
 
634
640
#else
635
641
template <class _Tp>
636
642
#endif
637
 
struct _LIBCPP_TYPE_VIS equal_to : binary_function<_Tp, _Tp, bool>
 
643
struct _LIBCPP_TYPE_VIS_ONLY equal_to : binary_function<_Tp, _Tp, bool>
638
644
{
639
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
 
645
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
646
    bool operator()(const _Tp& __x, const _Tp& __y) const
640
647
        {return __x == __y;}
641
648
};
642
649
 
643
650
#if _LIBCPP_STD_VER > 11
644
651
template <>
645
 
struct _LIBCPP_TYPE_VIS equal_to<void>
 
652
struct _LIBCPP_TYPE_VIS_ONLY equal_to<void>
646
653
{
647
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
654
    template <class _T1, class _T2>
 
655
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
648
656
    auto operator()(_T1&& __t, _T2&& __u) const
649
657
        { return _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); }
 
658
    typedef void is_transparent;
650
659
};
651
660
#endif
652
661
 
656
665
#else
657
666
template <class _Tp>
658
667
#endif
659
 
struct _LIBCPP_TYPE_VIS not_equal_to : binary_function<_Tp, _Tp, bool>
 
668
struct _LIBCPP_TYPE_VIS_ONLY not_equal_to : binary_function<_Tp, _Tp, bool>
660
669
{
661
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
 
670
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
671
    bool operator()(const _Tp& __x, const _Tp& __y) const
662
672
        {return __x != __y;}
663
673
};
664
674
 
665
675
#if _LIBCPP_STD_VER > 11
666
676
template <>
667
 
struct _LIBCPP_TYPE_VIS not_equal_to<void>
 
677
struct _LIBCPP_TYPE_VIS_ONLY not_equal_to<void>
668
678
{
669
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
679
    template <class _T1, class _T2>
 
680
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
670
681
    auto operator()(_T1&& __t, _T2&& __u) const
671
682
        { return _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); }
 
683
    typedef void is_transparent;
672
684
};
673
685
#endif
674
686
 
678
690
#else
679
691
template <class _Tp>
680
692
#endif
681
 
struct _LIBCPP_TYPE_VIS greater : binary_function<_Tp, _Tp, bool>
 
693
struct _LIBCPP_TYPE_VIS_ONLY greater : binary_function<_Tp, _Tp, bool>
682
694
{
683
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
 
695
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
696
    bool operator()(const _Tp& __x, const _Tp& __y) const
684
697
        {return __x > __y;}
685
698
};
686
699
 
687
700
#if _LIBCPP_STD_VER > 11
688
701
template <>
689
 
struct _LIBCPP_TYPE_VIS greater<void>
 
702
struct _LIBCPP_TYPE_VIS_ONLY greater<void>
690
703
{
691
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
704
    template <class _T1, class _T2>
 
705
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
692
706
    auto operator()(_T1&& __t, _T2&& __u) const
693
707
        { return _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); }
 
708
    typedef void is_transparent;
694
709
};
695
710
#endif
696
711
 
702
717
#else
703
718
template <class _Tp>
704
719
#endif
705
 
struct _LIBCPP_TYPE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
 
720
struct _LIBCPP_TYPE_VIS_ONLY greater_equal : binary_function<_Tp, _Tp, bool>
706
721
{
707
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
 
722
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
723
    bool operator()(const _Tp& __x, const _Tp& __y) const
708
724
        {return __x >= __y;}
709
725
};
710
726
 
711
727
#if _LIBCPP_STD_VER > 11
712
728
template <>
713
 
struct _LIBCPP_TYPE_VIS greater_equal<void>
 
729
struct _LIBCPP_TYPE_VIS_ONLY greater_equal<void>
714
730
{
715
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
731
    template <class _T1, class _T2>
 
732
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
716
733
    auto operator()(_T1&& __t, _T2&& __u) const
717
734
        { return _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); }
 
735
    typedef void is_transparent;
718
736
};
719
737
#endif
720
738
 
724
742
#else
725
743
template <class _Tp>
726
744
#endif
727
 
struct _LIBCPP_TYPE_VIS less_equal : binary_function<_Tp, _Tp, bool>
 
745
struct _LIBCPP_TYPE_VIS_ONLY less_equal : binary_function<_Tp, _Tp, bool>
728
746
{
729
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
 
747
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
748
    bool operator()(const _Tp& __x, const _Tp& __y) const
730
749
        {return __x <= __y;}
731
750
};
732
751
 
733
752
#if _LIBCPP_STD_VER > 11
734
753
template <>
735
 
struct _LIBCPP_TYPE_VIS less_equal<void>
 
754
struct _LIBCPP_TYPE_VIS_ONLY less_equal<void>
736
755
{
737
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
756
    template <class _T1, class _T2>
 
757
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
738
758
    auto operator()(_T1&& __t, _T2&& __u) const
739
759
        { return _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); }
 
760
    typedef void is_transparent;
740
761
};
741
762
#endif
742
763
 
746
767
#else
747
768
template <class _Tp>
748
769
#endif
749
 
struct _LIBCPP_TYPE_VIS logical_and : binary_function<_Tp, _Tp, bool>
 
770
struct _LIBCPP_TYPE_VIS_ONLY logical_and : binary_function<_Tp, _Tp, bool>
750
771
{
751
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
 
772
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
773
    bool operator()(const _Tp& __x, const _Tp& __y) const
752
774
        {return __x && __y;}
753
775
};
754
776
 
755
777
#if _LIBCPP_STD_VER > 11
756
778
template <>
757
 
struct _LIBCPP_TYPE_VIS logical_and<void>
 
779
struct _LIBCPP_TYPE_VIS_ONLY logical_and<void>
758
780
{
759
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
781
    template <class _T1, class _T2>
 
782
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
760
783
    auto operator()(_T1&& __t, _T2&& __u) const
761
784
        { return _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); }
 
785
    typedef void is_transparent;
762
786
};
763
787
#endif
764
788
 
768
792
#else
769
793
template <class _Tp>
770
794
#endif
771
 
struct _LIBCPP_TYPE_VIS logical_or : binary_function<_Tp, _Tp, bool>
 
795
struct _LIBCPP_TYPE_VIS_ONLY logical_or : binary_function<_Tp, _Tp, bool>
772
796
{
773
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
 
797
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
798
    bool operator()(const _Tp& __x, const _Tp& __y) const
774
799
        {return __x || __y;}
775
800
};
776
801
 
777
802
#if _LIBCPP_STD_VER > 11
778
803
template <>
779
 
struct _LIBCPP_TYPE_VIS logical_or<void>
 
804
struct _LIBCPP_TYPE_VIS_ONLY logical_or<void>
780
805
{
781
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
806
    template <class _T1, class _T2>
 
807
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
782
808
    auto operator()(_T1&& __t, _T2&& __u) const
783
809
        { return _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); }
 
810
    typedef void is_transparent;
784
811
};
785
812
#endif
786
813
 
790
817
#else
791
818
template <class _Tp>
792
819
#endif
793
 
struct _LIBCPP_TYPE_VIS logical_not : unary_function<_Tp, bool>
 
820
struct _LIBCPP_TYPE_VIS_ONLY logical_not : unary_function<_Tp, bool>
794
821
{
795
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x) const
 
822
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
823
    bool operator()(const _Tp& __x) const
796
824
        {return !__x;}
797
825
};
798
826
 
799
827
#if _LIBCPP_STD_VER > 11
800
828
template <>
801
 
struct _LIBCPP_TYPE_VIS logical_not<void>
 
829
struct _LIBCPP_TYPE_VIS_ONLY logical_not<void>
802
830
{
803
831
    template <class _Tp>
804
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_Tp&& __x) const
 
832
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
833
    auto operator()(_Tp&& __x) const
805
834
        { return !_VSTD::forward<_Tp>(__x); }
 
835
    typedef void is_transparent;
806
836
};
807
837
#endif
808
838
 
812
842
#else
813
843
template <class _Tp>
814
844
#endif
815
 
struct _LIBCPP_TYPE_VIS bit_and : binary_function<_Tp, _Tp, _Tp>
 
845
struct _LIBCPP_TYPE_VIS_ONLY bit_and : binary_function<_Tp, _Tp, _Tp>
816
846
{
817
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
847
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
848
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
818
849
        {return __x & __y;}
819
850
};
820
851
 
821
852
#if _LIBCPP_STD_VER > 11
822
853
template <>
823
 
struct _LIBCPP_TYPE_VIS bit_and<void>
 
854
struct _LIBCPP_TYPE_VIS_ONLY bit_and<void>
824
855
{
825
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
856
    template <class _T1, class _T2>
 
857
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
826
858
    auto operator()(_T1&& __t, _T2&& __u) const
827
859
        { return _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); }
 
860
    typedef void is_transparent;
828
861
};
829
862
#endif
830
863
 
834
867
#else
835
868
template <class _Tp>
836
869
#endif
837
 
struct _LIBCPP_TYPE_VIS bit_or : binary_function<_Tp, _Tp, _Tp>
 
870
struct _LIBCPP_TYPE_VIS_ONLY bit_or : binary_function<_Tp, _Tp, _Tp>
838
871
{
839
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
872
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
873
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
840
874
        {return __x | __y;}
841
875
};
842
876
 
843
877
#if _LIBCPP_STD_VER > 11
844
878
template <>
845
 
struct _LIBCPP_TYPE_VIS bit_or<void>
 
879
struct _LIBCPP_TYPE_VIS_ONLY bit_or<void>
846
880
{
847
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
881
    template <class _T1, class _T2>
 
882
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
848
883
    auto operator()(_T1&& __t, _T2&& __u) const
849
884
        { return _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); }
 
885
    typedef void is_transparent;
850
886
};
851
887
#endif
852
888
 
856
892
#else
857
893
template <class _Tp>
858
894
#endif
859
 
struct _LIBCPP_TYPE_VIS bit_xor : binary_function<_Tp, _Tp, _Tp>
 
895
struct _LIBCPP_TYPE_VIS_ONLY bit_xor : binary_function<_Tp, _Tp, _Tp>
860
896
{
861
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x, const _Tp& __y) const
 
897
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
898
    _Tp operator()(const _Tp& __x, const _Tp& __y) const
862
899
        {return __x ^ __y;}
863
900
};
864
901
 
865
902
#if _LIBCPP_STD_VER > 11
866
903
template <>
867
 
struct _LIBCPP_TYPE_VIS bit_xor<void>
 
904
struct _LIBCPP_TYPE_VIS_ONLY bit_xor<void>
868
905
{
869
 
    template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
 
906
    template <class _T1, class _T2>
 
907
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
870
908
    auto operator()(_T1&& __t, _T2&& __u) const
871
909
        { return _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); }
 
910
    typedef void is_transparent;
872
911
};
873
912
#endif
874
913
 
875
914
 
876
915
#if _LIBCPP_STD_VER > 11
877
916
template <class _Tp = void>
878
 
struct _LIBCPP_TYPE_VIS bit_not : unary_function<_Tp, _Tp>
 
917
struct _LIBCPP_TYPE_VIS_ONLY bit_not : unary_function<_Tp, _Tp>
879
918
{
880
 
    _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x) const
 
919
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
920
    _Tp operator()(const _Tp& __x) const
881
921
        {return ~__x;}
882
922
};
883
923
 
884
924
template <>
885
 
struct _LIBCPP_TYPE_VIS bit_not<void>
 
925
struct _LIBCPP_TYPE_VIS_ONLY bit_not<void>
886
926
{
887
927
    template <class _Tp>
888
 
    _LIBCPP_INLINE_VISIBILITY auto operator()(_Tp&& __x) const
 
928
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
929
    auto operator()(_Tp&& __x) const
889
930
        { return ~_VSTD::forward<_Tp>(__x); }
 
931
    typedef void is_transparent;
890
932
};
891
933
#endif
892
934
 
893
935
template <class _Predicate>
894
 
class _LIBCPP_TYPE_VIS unary_negate
 
936
class _LIBCPP_TYPE_VIS_ONLY unary_negate
895
937
    : public unary_function<typename _Predicate::argument_type, bool>
896
938
{
897
939
    _Predicate __pred_;
898
940
public:
899
 
    _LIBCPP_INLINE_VISIBILITY explicit unary_negate(const _Predicate& __pred)
 
941
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
942
    explicit unary_negate(const _Predicate& __pred)
900
943
        : __pred_(__pred) {}
901
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const typename _Predicate::argument_type& __x) const
 
944
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
945
    bool operator()(const typename _Predicate::argument_type& __x) const
902
946
        {return !__pred_(__x);}
903
947
};
904
948
 
905
949
template <class _Predicate>
906
 
inline _LIBCPP_INLINE_VISIBILITY
 
950
inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
907
951
unary_negate<_Predicate>
908
952
not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}
909
953
 
910
954
template <class _Predicate>
911
 
class _LIBCPP_TYPE_VIS binary_negate
 
955
class _LIBCPP_TYPE_VIS_ONLY binary_negate
912
956
    : public binary_function<typename _Predicate::first_argument_type,
913
957
                             typename _Predicate::second_argument_type,
914
958
                             bool>
915
959
{
916
960
    _Predicate __pred_;
917
961
public:
918
 
    _LIBCPP_INLINE_VISIBILITY explicit binary_negate(const _Predicate& __pred)
919
 
        : __pred_(__pred) {}
920
 
    _LIBCPP_INLINE_VISIBILITY bool operator()(const typename _Predicate::first_argument_type& __x,
 
962
    _LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_AFTER_CXX11 
 
963
    binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
 
964
 
 
965
    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 
966
    bool operator()(const typename _Predicate::first_argument_type& __x,
921
967
                    const typename _Predicate::second_argument_type& __y) const
922
968
        {return !__pred_(__x, __y);}
923
969
};
924
970
 
925
971
template <class _Predicate>
926
 
inline _LIBCPP_INLINE_VISIBILITY
 
972
inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
927
973
binary_negate<_Predicate>
928
974
not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
929
975
 
930
976
template <class __Operation>
931
 
class _LIBCPP_TYPE_VIS binder1st
 
977
class _LIBCPP_TYPE_VIS_ONLY binder1st
932
978
    : public unary_function<typename __Operation::second_argument_type,
933
979
                            typename __Operation::result_type>
934
980
{
954
1000
    {return binder1st<__Operation>(__op, __x);}
955
1001
 
956
1002
template <class __Operation>
957
 
class _LIBCPP_TYPE_VIS binder2nd
 
1003
class _LIBCPP_TYPE_VIS_ONLY binder2nd
958
1004
    : public unary_function<typename __Operation::first_argument_type,
959
1005
                            typename __Operation::result_type>
960
1006
{
980
1026
    {return binder2nd<__Operation>(__op, __x);}
981
1027
 
982
1028
template <class _Arg, class _Result>
983
 
class _LIBCPP_TYPE_VIS pointer_to_unary_function
 
1029
class _LIBCPP_TYPE_VIS_ONLY pointer_to_unary_function
984
1030
    : public unary_function<_Arg, _Result>
985
1031
{
986
1032
    _Result (*__f_)(_Arg);
998
1044
    {return pointer_to_unary_function<_Arg,_Result>(__f);}
999
1045
 
1000
1046
template <class _Arg1, class _Arg2, class _Result>
1001
 
class _LIBCPP_TYPE_VIS pointer_to_binary_function
 
1047
class _LIBCPP_TYPE_VIS_ONLY pointer_to_binary_function
1002
1048
    : public binary_function<_Arg1, _Arg2, _Result>
1003
1049
{
1004
1050
    _Result (*__f_)(_Arg1, _Arg2);
1016
1062
    {return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f);}
1017
1063
 
1018
1064
template<class _Sp, class _Tp>
1019
 
class _LIBCPP_TYPE_VIS mem_fun_t : public unary_function<_Tp*, _Sp>
 
1065
class _LIBCPP_TYPE_VIS_ONLY mem_fun_t : public unary_function<_Tp*, _Sp>
1020
1066
{
1021
1067
    _Sp (_Tp::*__p_)();
1022
1068
public:
1027
1073
};
1028
1074
 
1029
1075
template<class _Sp, class _Tp, class _Ap>
1030
 
class _LIBCPP_TYPE_VIS mem_fun1_t : public binary_function<_Tp*, _Ap, _Sp>
 
1076
class _LIBCPP_TYPE_VIS_ONLY mem_fun1_t : public binary_function<_Tp*, _Ap, _Sp>
1031
1077
{
1032
1078
    _Sp (_Tp::*__p_)(_Ap);
1033
1079
public:
1050
1096
    {return mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
1051
1097
 
1052
1098
template<class _Sp, class _Tp>
1053
 
class _LIBCPP_TYPE_VIS mem_fun_ref_t : public unary_function<_Tp, _Sp>
 
1099
class _LIBCPP_TYPE_VIS_ONLY mem_fun_ref_t : public unary_function<_Tp, _Sp>
1054
1100
{
1055
1101
    _Sp (_Tp::*__p_)();
1056
1102
public:
1061
1107
};
1062
1108
 
1063
1109
template<class _Sp, class _Tp, class _Ap>
1064
 
class _LIBCPP_TYPE_VIS mem_fun1_ref_t : public binary_function<_Tp, _Ap, _Sp>
 
1110
class _LIBCPP_TYPE_VIS_ONLY mem_fun1_ref_t : public binary_function<_Tp, _Ap, _Sp>
1065
1111
{
1066
1112
    _Sp (_Tp::*__p_)(_Ap);
1067
1113
public:
1084
1130
    {return mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
1085
1131
 
1086
1132
template <class _Sp, class _Tp>
1087
 
class _LIBCPP_TYPE_VIS const_mem_fun_t : public unary_function<const _Tp*, _Sp>
 
1133
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun_t : public unary_function<const _Tp*, _Sp>
1088
1134
{
1089
1135
    _Sp (_Tp::*__p_)() const;
1090
1136
public:
1095
1141
};
1096
1142
 
1097
1143
template <class _Sp, class _Tp, class _Ap>
1098
 
class _LIBCPP_TYPE_VIS const_mem_fun1_t : public binary_function<const _Tp*, _Ap, _Sp>
 
1144
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun1_t : public binary_function<const _Tp*, _Ap, _Sp>
1099
1145
{
1100
1146
    _Sp (_Tp::*__p_)(_Ap) const;
1101
1147
public:
1118
1164
    {return const_mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
1119
1165
 
1120
1166
template <class _Sp, class _Tp>
1121
 
class _LIBCPP_TYPE_VIS const_mem_fun_ref_t : public unary_function<_Tp, _Sp>
 
1167
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun_ref_t : public unary_function<_Tp, _Sp>
1122
1168
{
1123
1169
    _Sp (_Tp::*__p_)() const;
1124
1170
public:
1129
1175
};
1130
1176
 
1131
1177
template <class _Sp, class _Tp, class _Ap>
1132
 
class _LIBCPP_TYPE_VIS const_mem_fun1_ref_t
 
1178
class _LIBCPP_TYPE_VIS_ONLY const_mem_fun1_ref_t
1133
1179
    : public binary_function<_Tp, _Ap, _Sp>
1134
1180
{
1135
1181
    _Sp (_Tp::*__p_)(_Ap) const;
1189
1235
    return __mem_fn<_Rp _Tp::*>(__pm);
1190
1236
}
1191
1237
 
1192
 
template<class _Rp, class _Tp, class ..._Args>
1193
 
inline _LIBCPP_INLINE_VISIBILITY
1194
 
__mem_fn<_Rp (_Tp::*)(_Args...)>
1195
 
mem_fn(_Rp (_Tp::* __pm)(_Args...))
1196
 
{
1197
 
    return __mem_fn<_Rp (_Tp::*)(_Args...)>(__pm);
1198
 
}
1199
 
 
1200
 
template<class _Rp, class _Tp, class ..._Args>
1201
 
inline _LIBCPP_INLINE_VISIBILITY
1202
 
__mem_fn<_Rp (_Tp::*)(_Args...) const>
1203
 
mem_fn(_Rp (_Tp::* __pm)(_Args...) const)
1204
 
{
1205
 
    return __mem_fn<_Rp (_Tp::*)(_Args...) const>(__pm);
1206
 
}
1207
 
 
1208
 
template<class _Rp, class _Tp, class ..._Args>
1209
 
inline _LIBCPP_INLINE_VISIBILITY
1210
 
__mem_fn<_Rp (_Tp::*)(_Args...) volatile>
1211
 
mem_fn(_Rp (_Tp::* __pm)(_Args...) volatile)
1212
 
{
1213
 
    return __mem_fn<_Rp (_Tp::*)(_Args...) volatile>(__pm);
1214
 
}
1215
 
 
1216
 
template<class _Rp, class _Tp, class ..._Args>
1217
 
inline _LIBCPP_INLINE_VISIBILITY
1218
 
__mem_fn<_Rp (_Tp::*)(_Args...) const volatile>
1219
 
mem_fn(_Rp (_Tp::* __pm)(_Args...) const volatile)
1220
 
{
1221
 
    return __mem_fn<_Rp (_Tp::*)(_Args...) const volatile>(__pm);
1222
 
}
1223
 
 
1224
1238
// bad_function_call
1225
1239
 
1226
1240
class _LIBCPP_EXCEPTION_ABI bad_function_call
1228
1242
{
1229
1243
};
1230
1244
 
1231
 
template<class _Fp> class _LIBCPP_TYPE_VIS function; // undefined
 
1245
template<class _Fp> class _LIBCPP_TYPE_VIS_ONLY function; // undefined
1232
1246
 
1233
1247
namespace __function
1234
1248
{
1379
1393
}  // __function
1380
1394
 
1381
1395
template<class _Rp, class ..._ArgTypes>
1382
 
class _LIBCPP_TYPE_VIS function<_Rp(_ArgTypes...)>
 
1396
class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_ArgTypes...)>
1383
1397
    : public __function::__maybe_derive_from_unary_function<_Rp(_ArgTypes...)>,
1384
1398
      public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)>
1385
1399
{
1801
1815
{return __x.swap(__y);}
1802
1816
 
1803
1817
template<class _Tp> struct __is_bind_expression : public false_type {};
1804
 
template<class _Tp> struct _LIBCPP_TYPE_VIS is_bind_expression
 
1818
template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_bind_expression
1805
1819
    : public __is_bind_expression<typename remove_cv<_Tp>::type> {};
1806
1820
 
1807
1821
template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
1808
 
template<class _Tp> struct _LIBCPP_TYPE_VIS is_placeholder
 
1822
template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_placeholder
1809
1823
    : public __is_placeholder<typename remove_cv<_Tp>::type> {};
1810
1824
 
1811
1825
namespace placeholders
1813
1827
 
1814
1828
template <int _Np> struct __ph {};
1815
1829
 
1816
 
extern __ph<1>   _1;
1817
 
extern __ph<2>   _2;
1818
 
extern __ph<3>   _3;
1819
 
extern __ph<4>   _4;
1820
 
extern __ph<5>   _5;
1821
 
extern __ph<6>   _6;
1822
 
extern __ph<7>   _7;
1823
 
extern __ph<8>   _8;
1824
 
extern __ph<9>   _9;
1825
 
extern __ph<10> _10;
 
1830
_LIBCPP_FUNC_VIS extern __ph<1>   _1;
 
1831
_LIBCPP_FUNC_VIS extern __ph<2>   _2;
 
1832
_LIBCPP_FUNC_VIS extern __ph<3>   _3;
 
1833
_LIBCPP_FUNC_VIS extern __ph<4>   _4;
 
1834
_LIBCPP_FUNC_VIS extern __ph<5>   _5;
 
1835
_LIBCPP_FUNC_VIS extern __ph<6>   _6;
 
1836
_LIBCPP_FUNC_VIS extern __ph<7>   _7;
 
1837
_LIBCPP_FUNC_VIS extern __ph<8>   _8;
 
1838
_LIBCPP_FUNC_VIS extern __ph<9>   _9;
 
1839
_LIBCPP_FUNC_VIS extern __ph<10> _10;
1826
1840
 
1827
1841
}  // placeholders
1828
1842
 
2184
2198
#endif  // _LIBCPP_HAS_NO_VARIADICS
2185
2199
 
2186
2200
template <>
2187
 
struct _LIBCPP_TYPE_VIS hash<bool>
 
2201
struct _LIBCPP_TYPE_VIS_ONLY hash<bool>
2188
2202
    : public unary_function<bool, size_t>
2189
2203
{
2190
2204
    _LIBCPP_INLINE_VISIBILITY
2192
2206
};
2193
2207
 
2194
2208
template <>
2195
 
struct _LIBCPP_TYPE_VIS hash<char>
 
2209
struct _LIBCPP_TYPE_VIS_ONLY hash<char>
2196
2210
    : public unary_function<char, size_t>
2197
2211
{
2198
2212
    _LIBCPP_INLINE_VISIBILITY
2200
2214
};
2201
2215
 
2202
2216
template <>
2203
 
struct _LIBCPP_TYPE_VIS hash<signed char>
 
2217
struct _LIBCPP_TYPE_VIS_ONLY hash<signed char>
2204
2218
    : public unary_function<signed char, size_t>
2205
2219
{
2206
2220
    _LIBCPP_INLINE_VISIBILITY
2208
2222
};
2209
2223
 
2210
2224
template <>
2211
 
struct _LIBCPP_TYPE_VIS hash<unsigned char>
 
2225
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned char>
2212
2226
    : public unary_function<unsigned char, size_t>
2213
2227
{
2214
2228
    _LIBCPP_INLINE_VISIBILITY
2218
2232
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
2219
2233
 
2220
2234
template <>
2221
 
struct _LIBCPP_TYPE_VIS hash<char16_t>
 
2235
struct _LIBCPP_TYPE_VIS_ONLY hash<char16_t>
2222
2236
    : public unary_function<char16_t, size_t>
2223
2237
{
2224
2238
    _LIBCPP_INLINE_VISIBILITY
2226
2240
};
2227
2241
 
2228
2242
template <>
2229
 
struct _LIBCPP_TYPE_VIS hash<char32_t>
 
2243
struct _LIBCPP_TYPE_VIS_ONLY hash<char32_t>
2230
2244
    : public unary_function<char32_t, size_t>
2231
2245
{
2232
2246
    _LIBCPP_INLINE_VISIBILITY
2236
2250
#endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
2237
2251
 
2238
2252
template <>
2239
 
struct _LIBCPP_TYPE_VIS hash<wchar_t>
 
2253
struct _LIBCPP_TYPE_VIS_ONLY hash<wchar_t>
2240
2254
    : public unary_function<wchar_t, size_t>
2241
2255
{
2242
2256
    _LIBCPP_INLINE_VISIBILITY
2244
2258
};
2245
2259
 
2246
2260
template <>
2247
 
struct _LIBCPP_TYPE_VIS hash<short>
 
2261
struct _LIBCPP_TYPE_VIS_ONLY hash<short>
2248
2262
    : public unary_function<short, size_t>
2249
2263
{
2250
2264
    _LIBCPP_INLINE_VISIBILITY
2252
2266
};
2253
2267
 
2254
2268
template <>
2255
 
struct _LIBCPP_TYPE_VIS hash<unsigned short>
 
2269
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned short>
2256
2270
    : public unary_function<unsigned short, size_t>
2257
2271
{
2258
2272
    _LIBCPP_INLINE_VISIBILITY
2260
2274
};
2261
2275
 
2262
2276
template <>
2263
 
struct _LIBCPP_TYPE_VIS hash<int>
 
2277
struct _LIBCPP_TYPE_VIS_ONLY hash<int>
2264
2278
    : public unary_function<int, size_t>
2265
2279
{
2266
2280
    _LIBCPP_INLINE_VISIBILITY
2268
2282
};
2269
2283
 
2270
2284
template <>
2271
 
struct _LIBCPP_TYPE_VIS hash<unsigned int>
 
2285
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned int>
2272
2286
    : public unary_function<unsigned int, size_t>
2273
2287
{
2274
2288
    _LIBCPP_INLINE_VISIBILITY
2276
2290
};
2277
2291
 
2278
2292
template <>
2279
 
struct _LIBCPP_TYPE_VIS hash<long>
 
2293
struct _LIBCPP_TYPE_VIS_ONLY hash<long>
2280
2294
    : public unary_function<long, size_t>
2281
2295
{
2282
2296
    _LIBCPP_INLINE_VISIBILITY
2284
2298
};
2285
2299
 
2286
2300
template <>
2287
 
struct _LIBCPP_TYPE_VIS hash<unsigned long>
 
2301
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long>
2288
2302
    : public unary_function<unsigned long, size_t>
2289
2303
{
2290
2304
    _LIBCPP_INLINE_VISIBILITY
2292
2306
};
2293
2307
 
2294
2308
template <>
2295
 
struct _LIBCPP_TYPE_VIS hash<long long>
 
2309
struct _LIBCPP_TYPE_VIS_ONLY hash<long long>
2296
2310
    : public __scalar_hash<long long>
2297
2311
{
2298
2312
};
2299
2313
 
2300
2314
template <>
2301
 
struct _LIBCPP_TYPE_VIS hash<unsigned long long>
 
2315
struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long long>
2302
2316
    : public __scalar_hash<unsigned long long>
2303
2317
{
2304
2318
};
2305
2319
 
2306
2320
template <>
2307
 
struct _LIBCPP_TYPE_VIS hash<float>
 
2321
struct _LIBCPP_TYPE_VIS_ONLY hash<float>
2308
2322
    : public __scalar_hash<float>
2309
2323
{
2310
2324
    _LIBCPP_INLINE_VISIBILITY
2318
2332
};
2319
2333
 
2320
2334
template <>
2321
 
struct _LIBCPP_TYPE_VIS hash<double>
 
2335
struct _LIBCPP_TYPE_VIS_ONLY hash<double>
2322
2336
    : public __scalar_hash<double>
2323
2337
{
2324
2338
    _LIBCPP_INLINE_VISIBILITY
2332
2346
};
2333
2347
 
2334
2348
template <>
2335
 
struct _LIBCPP_TYPE_VIS hash<long double>
 
2349
struct _LIBCPP_TYPE_VIS_ONLY hash<long double>
2336
2350
    : public __scalar_hash<long double>
2337
2351
{
2338
2352
    _LIBCPP_INLINE_VISIBILITY
2381
2395
    }
2382
2396
};
2383
2397
 
 
2398
#if _LIBCPP_STD_VER > 11
 
2399
template <class _Tp>
 
2400
struct _LIBCPP_TYPE_VIS_ONLY hash
 
2401
    : public unary_function<_Tp, size_t>
 
2402
{
 
2403
    static_assert(is_enum<_Tp>::value, "This hash only works for enumeration types");
 
2404
 
 
2405
    _LIBCPP_INLINE_VISIBILITY
 
2406
    size_t operator()(_Tp __v) const _NOEXCEPT
 
2407
    {
 
2408
        typedef typename underlying_type<_Tp>::type type;
 
2409
        return hash<type>{}(static_cast<type>(__v));
 
2410
    }
 
2411
};
 
2412
#endif
 
2413
 
2384
2414
// struct hash<T*> in <memory>
2385
2415
 
2386
2416
_LIBCPP_END_NAMESPACE_STD