Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/ratio/ratio_io.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
42 #include <boost/ratio/ratio.hpp> | 42 #include <boost/ratio/ratio.hpp> |
43 #include <boost/type_traits/integral_constant.hpp> | 43 #include <boost/type_traits/integral_constant.hpp> |
44 #include <string> | 44 #include <string> |
45 #include <sstream> | 45 #include <sstream> |
46 | 46 |
47 #ifdef BOOST_RATIO_HAS_STATIC_STRING | |
48 #include <boost/ratio/ratio_static_string.hpp> | |
49 #include <boost/static_string/static_string.hpp> | |
50 #endif | |
51 | 47 |
52 #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T) || defined(BOOST_NO_CXX11_U16STRING) || defined(BOOST_NO_CXX11_U32STRING) | 48 #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T) || defined(BOOST_NO_CXX11_U16STRING) || defined(BOOST_NO_CXX11_U32STRING) |
53 #if defined BOOST_RATIO_HAS_UNICODE_SUPPORT | 49 #if defined BOOST_RATIO_HAS_UNICODE_SUPPORT |
54 #undef BOOST_RATIO_HAS_UNICODE_SUPPORT | 50 #undef BOOST_RATIO_HAS_UNICODE_SUPPORT |
55 #endif | 51 #endif |
816 static std::wstring prefix() {return std::wstring(L"exa");} | 812 static std::wstring prefix() {return std::wstring(L"exa");} |
817 }; | 813 }; |
818 #endif | 814 #endif |
819 #endif | 815 #endif |
820 | 816 |
817 | |
818 #ifdef BOOST_RATIO_EXTENSIONS | |
819 | |
820 #ifdef BOOST_RATIO_HAS_STATIC_STRING | |
821 template <typename CharT> | |
822 struct ratio_string<kibi, CharT> : | |
823 ratio_detail::ratio_string_static<kibi,CharT> | |
824 {}; | |
825 | |
826 #else | |
827 template <> | |
828 struct ratio_string<kibi, char> | |
829 { | |
830 static std::string symbol() {return std::string("Ki");} | |
831 static std::string prefix() {return std::string("kibi");} | |
832 }; | |
833 | |
834 #if BOOST_RATIO_HAS_UNICODE_SUPPORT | |
835 | |
836 template <> | |
837 struct ratio_string<kibi, char16_t> | |
838 { | |
839 static std::u16string symbol() {return std::u16string(u"Ki");} | |
840 static std::u16string prefix() {return std::u16string(u"kibi");} | |
841 }; | |
842 | |
843 template <> | |
844 struct ratio_string<kibi, char32_t> | |
845 { | |
846 static std::u32string symbol() {return std::u32string(U"Ki");} | |
847 static std::u32string prefix() {return std::u32string(U"kibi");} | |
848 }; | |
849 | |
850 #endif | |
851 | |
852 #ifndef BOOST_NO_STD_WSTRING | |
853 template <> | |
854 struct ratio_string<kibi, wchar_t> | |
855 { | |
856 static std::wstring symbol() {return std::wstring(L"Ki");} | |
857 static std::wstring prefix() {return std::wstring(L"kibi");} | |
858 }; | |
859 #endif | |
860 #endif | |
861 | |
862 #ifdef BOOST_RATIO_HAS_STATIC_STRING | |
863 template <typename CharT> | |
864 struct ratio_string<mebi, CharT> : | |
865 ratio_detail::ratio_string_static<mebi,CharT> | |
866 {}; | |
867 | |
868 #else | |
869 template <> | |
870 struct ratio_string<mebi, char> | |
871 { | |
872 static std::string symbol() {return std::string("Mi");} | |
873 static std::string prefix() {return std::string("mebi");} | |
874 }; | |
875 | |
876 #if BOOST_RATIO_HAS_UNICODE_SUPPORT | |
877 | |
878 template <> | |
879 struct ratio_string<mebi, char16_t> | |
880 { | |
881 static std::u16string symbol() {return std::u16string(u"Mi");} | |
882 static std::u16string prefix() {return std::u16string(u"mebi");} | |
883 }; | |
884 | |
885 template <> | |
886 struct ratio_string<mebi, char32_t> | |
887 { | |
888 static std::u32string symbol() {return std::u32string(U"Mi");} | |
889 static std::u32string prefix() {return std::u32string(U"mebi");} | |
890 }; | |
891 | |
892 #endif | |
893 | |
894 #ifndef BOOST_NO_STD_WSTRING | |
895 template <> | |
896 struct ratio_string<mebi, wchar_t> | |
897 { | |
898 static std::wstring symbol() {return std::wstring(L"Mi");} | |
899 static std::wstring prefix() {return std::wstring(L"mebi");} | |
900 }; | |
901 #endif | |
902 #endif | |
903 | |
904 #ifdef BOOST_RATIO_HAS_STATIC_STRING | |
905 template <typename CharT> | |
906 struct ratio_string<gibi, CharT> : | |
907 ratio_detail::ratio_string_static<gibi,CharT> | |
908 {}; | |
909 | |
910 #else | |
911 template <> | |
912 struct ratio_string<gibi, char> | |
913 { | |
914 static std::string symbol() {return std::string("Gi");} | |
915 static std::string prefix() {return std::string("gibi");} | |
916 }; | |
917 | |
918 #if BOOST_RATIO_HAS_UNICODE_SUPPORT | |
919 | |
920 template <> | |
921 struct ratio_string<gibi, char16_t> | |
922 { | |
923 static std::u16string symbol() {return std::u16string(u"Gi");} | |
924 static std::u16string prefix() {return std::u16string(u"gibi");} | |
925 }; | |
926 | |
927 template <> | |
928 struct ratio_string<gibi, char32_t> | |
929 { | |
930 static std::u32string symbol() {return std::u32string(U"Gi");} | |
931 static std::u32string prefix() {return std::u32string(U"gibi");} | |
932 }; | |
933 | |
934 #endif | |
935 | |
936 #ifndef BOOST_NO_STD_WSTRING | |
937 template <> | |
938 struct ratio_string<gibi, wchar_t> | |
939 { | |
940 static std::wstring symbol() {return std::wstring(L"Gi");} | |
941 static std::wstring prefix() {return std::wstring(L"gibi");} | |
942 }; | |
943 #endif | |
944 #endif | |
945 | |
946 #ifdef BOOST_RATIO_HAS_STATIC_STRING | |
947 template <typename CharT> | |
948 struct ratio_string<tebi, CharT> : | |
949 ratio_detail::ratio_string_static<tebi,CharT> | |
950 {}; | |
951 | |
952 #else | |
953 template <> | |
954 struct ratio_string<tebi, char> | |
955 { | |
956 static std::string symbol() {return std::string("Ti");} | |
957 static std::string prefix() {return std::string("tebi");} | |
958 }; | |
959 | |
960 #if BOOST_RATIO_HAS_UNICODE_SUPPORT | |
961 | |
962 template <> | |
963 struct ratio_string<tebi, char16_t> | |
964 { | |
965 static std::u16string symbol() {return std::u16string(u"Ti");} | |
966 static std::u16string prefix() {return std::u16string(u"tebi");} | |
967 }; | |
968 | |
969 template <> | |
970 struct ratio_string<tebi, char32_t> | |
971 { | |
972 static std::u32string symbol() {return std::u32string(U"Ti");} | |
973 static std::u32string prefix() {return std::u32string(U"tebi");} | |
974 }; | |
975 | |
976 #endif | |
977 | |
978 #ifndef BOOST_NO_STD_WSTRING | |
979 template <> | |
980 struct ratio_string<tebi, wchar_t> | |
981 { | |
982 static std::wstring symbol() {return std::wstring(L"Ti");} | |
983 static std::wstring prefix() {return std::wstring(L"tebi");} | |
984 }; | |
985 #endif | |
986 #endif | |
987 | |
988 #ifdef BOOST_RATIO_HAS_STATIC_STRING | |
989 template <typename CharT> | |
990 struct ratio_string<pebi, CharT> : | |
991 ratio_detail::ratio_string_static<pebi,CharT> | |
992 {}; | |
993 | |
994 #else | |
995 template <> | |
996 struct ratio_string<pebi, char> | |
997 { | |
998 static std::string symbol() {return std::string("Pi");} | |
999 static std::string prefix() {return std::string("pebi");} | |
1000 }; | |
1001 | |
1002 #if BOOST_RATIO_HAS_UNICODE_SUPPORT | |
1003 | |
1004 template <> | |
1005 struct ratio_string<pebi, char16_t> | |
1006 { | |
1007 static std::u16string symbol() {return std::u16string(u"Pi");} | |
1008 static std::u16string prefix() {return std::u16string(u"pebi");} | |
1009 }; | |
1010 | |
1011 template <> | |
1012 struct ratio_string<pebi, char32_t> | |
1013 { | |
1014 static std::u32string symbol() {return std::u32string(U"Pi");} | |
1015 static std::u32string prefix() {return std::u32string(U"pebi");} | |
1016 }; | |
1017 | |
1018 #endif | |
1019 | |
1020 #ifndef BOOST_NO_STD_WSTRING | |
1021 template <> | |
1022 struct ratio_string<pebi, wchar_t> | |
1023 { | |
1024 static std::wstring symbol() {return std::wstring(L"Pi");} | |
1025 static std::wstring prefix() {return std::wstring(L"pebi");} | |
1026 }; | |
1027 #endif | |
1028 #endif | |
1029 | |
1030 #ifdef BOOST_RATIO_HAS_STATIC_STRING | |
1031 template <typename CharT> | |
1032 struct ratio_string<exbi, CharT> : | |
1033 ratio_detail::ratio_string_static<exbi,CharT> | |
1034 {}; | |
1035 | |
1036 #else | |
1037 template <> | |
1038 struct ratio_string<exbi, char> | |
1039 { | |
1040 static std::string symbol() {return std::string("Ei");} | |
1041 static std::string prefix() {return std::string("exbi");} | |
1042 }; | |
1043 | |
1044 #if BOOST_RATIO_HAS_UNICODE_SUPPORT | |
1045 | |
1046 template <> | |
1047 struct ratio_string<exbi, char16_t> | |
1048 { | |
1049 static std::u16string symbol() {return std::u16string(u"Ei");} | |
1050 static std::u16string prefix() {return std::u16string(u"exbi");} | |
1051 }; | |
1052 | |
1053 template <> | |
1054 struct ratio_string<exbi, char32_t> | |
1055 { | |
1056 static std::u32string symbol() {return std::u32string(U"Ei");} | |
1057 static std::u32string prefix() {return std::u32string(U"exbi");} | |
1058 }; | |
1059 | |
1060 #endif | |
1061 | |
1062 #ifndef BOOST_NO_STD_WSTRING | |
1063 template <> | |
1064 struct ratio_string<exbi, wchar_t> | |
1065 { | |
1066 static std::wstring symbol() {return std::wstring(L"Ei");} | |
1067 static std::wstring prefix() {return std::wstring(L"exbi");} | |
1068 }; | |
1069 #endif | |
1070 #endif | |
1071 #endif | |
1072 | |
821 } | 1073 } |
822 | 1074 |
823 #endif // BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 | 1075 #endif // BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 |
824 #endif // BOOST_RATIO_RATIO_IO_HPP | 1076 #endif // BOOST_RATIO_RATIO_IO_HPP |