X7ROOT File Manager
Current Path:
/usr/include/c++/8/bits
usr
/
include
/
c++
/
8
/
bits
/
ðŸ“
..
📄
algorithmfwd.h
(21.23 KB)
📄
alloc_traits.h
(19.6 KB)
📄
allocated_ptr.h
(3.22 KB)
📄
allocator.h
(7.39 KB)
📄
atomic_base.h
(23.28 KB)
📄
atomic_futex.h
(9.35 KB)
📄
atomic_lockfree_defines.h
(2.2 KB)
📄
basic_ios.h
(15.7 KB)
📄
basic_ios.tcc
(5.94 KB)
📄
basic_string.h
(237.01 KB)
📄
basic_string.tcc
(52.5 KB)
📄
boost_concept_check.h
(26.52 KB)
📄
c++0x_warning.h
(1.44 KB)
📄
char_traits.h
(20.42 KB)
📄
codecvt.h
(20.79 KB)
📄
concept_check.h
(3.34 KB)
📄
cpp_type_traits.h
(9.56 KB)
📄
cxxabi_forced.h
(1.77 KB)
📄
cxxabi_init_exception.h
(2.17 KB)
📄
deque.tcc
(33.32 KB)
📄
enable_special_members.h
(12.1 KB)
📄
exception.h
(2.23 KB)
📄
exception_defines.h
(1.61 KB)
📄
exception_ptr.h
(5.84 KB)
📄
forward_list.h
(47.77 KB)
📄
forward_list.tcc
(12.86 KB)
📄
fs_dir.h
(14.38 KB)
📄
fs_fwd.h
(10.04 KB)
📄
fs_ops.h
(9.5 KB)
📄
fs_path.h
(32.12 KB)
📄
fstream.tcc
(32.03 KB)
📄
functexcept.h
(3.18 KB)
📄
functional_hash.h
(8.04 KB)
📄
gslice.h
(5.39 KB)
📄
gslice_array.h
(7.59 KB)
📄
hash_bytes.h
(2.1 KB)
📄
hashtable.h
(72.06 KB)
📄
hashtable_policy.h
(66.38 KB)
📄
indirect_array.h
(7.68 KB)
📄
invoke.h
(3.57 KB)
📄
ios_base.h
(30.3 KB)
📄
istream.tcc
(30.36 KB)
📄
list.tcc
(15.6 KB)
📄
locale_classes.h
(24.31 KB)
📄
locale_classes.tcc
(8.18 KB)
📄
locale_conv.h
(15.72 KB)
📄
locale_facets.h
(90.16 KB)
📄
locale_facets.tcc
(38.62 KB)
📄
locale_facets_nonio.h
(67.36 KB)
📄
locale_facets_nonio.tcc
(44.22 KB)
📄
localefwd.h
(5.51 KB)
📄
mask_array.h
(7.42 KB)
📄
memoryfwd.h
(2.4 KB)
📄
move.h
(6.38 KB)
📄
nested_exception.h
(4.69 KB)
📄
node_handle.h
(8.02 KB)
📄
ostream.tcc
(12.03 KB)
📄
ostream_insert.h
(3.91 KB)
📄
parse_numbers.h
(7.76 KB)
📄
postypes.h
(8.02 KB)
📄
predefined_ops.h
(8.87 KB)
📄
ptr_traits.h
(6.47 KB)
📄
quoted_string.h
(4.93 KB)
📄
random.h
(171.14 KB)
📄
random.tcc
(103.12 KB)
📄
range_access.h
(9.79 KB)
📄
refwrap.h
(11.61 KB)
📄
regex.h
(95.12 KB)
📄
regex.tcc
(16.18 KB)
📄
regex_automaton.h
(10.47 KB)
📄
regex_automaton.tcc
(7.65 KB)
📄
regex_compiler.h
(17.63 KB)
📄
regex_compiler.tcc
(18.84 KB)
📄
regex_constants.h
(14.36 KB)
📄
regex_error.h
(4.79 KB)
📄
regex_executor.h
(7.31 KB)
📄
regex_executor.tcc
(18.4 KB)
📄
regex_scanner.h
(6.92 KB)
📄
regex_scanner.tcc
(14.66 KB)
📄
shared_ptr.h
(22.88 KB)
📄
shared_ptr_atomic.h
(9.54 KB)
📄
shared_ptr_base.h
(53.01 KB)
📄
slice_array.h
(9.13 KB)
📄
specfun.h
(45.95 KB)
📄
sstream.tcc
(9.9 KB)
📄
std_abs.h
(3.19 KB)
📄
std_function.h
(22.71 KB)
📄
std_mutex.h
(9.08 KB)
📄
stl_algo.h
(209.27 KB)
📄
stl_algobase.h
(49.31 KB)
📄
stl_bvector.h
(32.94 KB)
📄
stl_construct.h
(7.22 KB)
📄
stl_deque.h
(76.73 KB)
📄
stl_function.h
(40.77 KB)
📄
stl_heap.h
(19.73 KB)
📄
stl_iterator.h
(41.3 KB)
📄
stl_iterator_base_funcs.h
(7.99 KB)
📄
stl_iterator_base_types.h
(8.48 KB)
📄
stl_list.h
(65.97 KB)
📄
stl_map.h
(51.55 KB)
📄
stl_multimap.h
(40.58 KB)
📄
stl_multiset.h
(34.97 KB)
📄
stl_numeric.h
(13.51 KB)
📄
stl_pair.h
(18.21 KB)
📄
stl_queue.h
(23.51 KB)
📄
stl_raw_storage_iter.h
(3.74 KB)
📄
stl_relops.h
(4.49 KB)
📄
stl_set.h
(35.28 KB)
📄
stl_stack.h
(11.66 KB)
📄
stl_tempbuf.h
(8.15 KB)
📄
stl_tree.h
(73.15 KB)
📄
stl_uninitialized.h
(27.06 KB)
📄
stl_vector.h
(59.12 KB)
📄
stream_iterator.h
(6.5 KB)
📄
streambuf.tcc
(4.81 KB)
📄
streambuf_iterator.h
(13.44 KB)
📄
string_view.tcc
(6.54 KB)
📄
stringfwd.h
(2.55 KB)
📄
uniform_int_dist.h
(9.84 KB)
📄
unique_ptr.h
(25.38 KB)
📄
unordered_map.h
(73.58 KB)
📄
unordered_set.h
(57.76 KB)
📄
uses_allocator.h
(6.37 KB)
📄
valarray_after.h
(22.12 KB)
📄
valarray_array.h
(21.3 KB)
📄
valarray_array.tcc
(7.08 KB)
📄
valarray_before.h
(18.08 KB)
📄
vector.tcc
(28.95 KB)
Editing: locale_classes.tcc
// Locale support -*- C++ -*- // Copyright (C) 2007-2018 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library 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 General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/locale_classes.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ // // ISO C++ 14882: 22.1 Locales // #ifndef _LOCALE_CLASSES_TCC #define _LOCALE_CLASSES_TCC 1 #pragma GCC system_header namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Facet> locale:: locale(const locale& __other, _Facet* __f) { _M_impl = new _Impl(*__other._M_impl, 1); __try { _M_impl->_M_install_facet(&_Facet::id, __f); } __catch(...) { _M_impl->_M_remove_reference(); __throw_exception_again; } delete [] _M_impl->_M_names[0]; _M_impl->_M_names[0] = 0; // Unnamed. } template<typename _Facet> locale locale:: combine(const locale& __other) const { _Impl* __tmp = new _Impl(*_M_impl, 1); __try { __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); } __catch(...) { __tmp->_M_remove_reference(); __throw_exception_again; } return locale(__tmp); } template<typename _CharT, typename _Traits, typename _Alloc> bool locale:: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, const basic_string<_CharT, _Traits, _Alloc>& __s2) const { typedef std::collate<_CharT> __collate_type; const __collate_type& __collate = use_facet<__collate_type>(*this); return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), __s2.data(), __s2.data() + __s2.length()) < 0); } /** * @brief Test for the presence of a facet. * @ingroup locales * * has_facet tests the locale argument for the presence of the facet type * provided as the template parameter. Facets derived from the facet * parameter will also return true. * * @tparam _Facet The facet type to test the presence of. * @param __loc The locale to test. * @return true if @p __loc contains a facet of type _Facet, else false. */ template<typename _Facet> bool has_facet(const locale& __loc) throw() { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; return (__i < __loc._M_impl->_M_facets_size #if __cpp_rtti && dynamic_cast<const _Facet*>(__facets[__i])); #else && static_cast<const _Facet*>(__facets[__i])); #endif } /** * @brief Return a facet. * @ingroup locales * * use_facet looks for and returns a reference to a facet of type Facet * where Facet is the template parameter. If has_facet(locale) is true, * there is a suitable facet to return. It throws std::bad_cast if the * locale doesn't contain a facet of type Facet. * * @tparam _Facet The facet type to access. * @param __loc The locale to use. * @return Reference to facet of type Facet. * @throw std::bad_cast if @p __loc doesn't contain a facet of type _Facet. */ template<typename _Facet> const _Facet& use_facet(const locale& __loc) { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) __throw_bad_cast(); #if __cpp_rtti return dynamic_cast<const _Facet&>(*__facets[__i]); #else return static_cast<const _Facet&>(*__facets[__i]); #endif } // Generic version does nothing. template<typename _CharT> int collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () { return 0; } // Generic version does nothing. template<typename _CharT> size_t collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () { return 0; } template<typename _CharT> int collate<_CharT>:: do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { // strcoll assumes zero-terminated strings so we make a copy // and then put a zero at the end. const string_type __one(__lo1, __hi1); const string_type __two(__lo2, __hi2); const _CharT* __p = __one.c_str(); const _CharT* __pend = __one.data() + __one.length(); const _CharT* __q = __two.c_str(); const _CharT* __qend = __two.data() + __two.length(); // strcoll stops when it sees a nul character so we break // the strings into zero-terminated substrings and pass those // to strcoll. for (;;) { const int __res = _M_compare(__p, __q); if (__res) return __res; __p += char_traits<_CharT>::length(__p); __q += char_traits<_CharT>::length(__q); if (__p == __pend && __q == __qend) return 0; else if (__p == __pend) return -1; else if (__q == __qend) return 1; __p++; __q++; } } template<typename _CharT> typename collate<_CharT>::string_type collate<_CharT>:: do_transform(const _CharT* __lo, const _CharT* __hi) const { string_type __ret; // strxfrm assumes zero-terminated strings so we make a copy const string_type __str(__lo, __hi); const _CharT* __p = __str.c_str(); const _CharT* __pend = __str.data() + __str.length(); size_t __len = (__hi - __lo) * 2; _CharT* __c = new _CharT[__len]; __try { // strxfrm stops when it sees a nul character so we break // the string into zero-terminated substrings and pass those // to strxfrm. for (;;) { // First try a buffer perhaps big enough. size_t __res = _M_transform(__c, __p, __len); // If the buffer was not large enough, try again with the // correct size. if (__res >= __len) { __len = __res + 1; delete [] __c, __c = 0; __c = new _CharT[__len]; __res = _M_transform(__c, __p, __len); } __ret.append(__c, __res); __p += char_traits<_CharT>::length(__p); if (__p == __pend) break; __p++; __ret.push_back(_CharT()); } } __catch(...) { delete [] __c; __throw_exception_again; } delete [] __c; return __ret; } template<typename _CharT> long collate<_CharT>:: do_hash(const _CharT* __lo, const _CharT* __hi) const { unsigned long __val = 0; for (; __lo < __hi; ++__lo) __val = *__lo + ((__val << 7) | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>:: __digits - 7))); return static_cast<long>(__val); } // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #if _GLIBCXX_EXTERN_TEMPLATE extern template class collate<char>; extern template class collate_byname<char>; extern template const collate<char>& use_facet<collate<char> >(const locale&); extern template bool has_facet<collate<char> >(const locale&); #ifdef _GLIBCXX_USE_WCHAR_T extern template class collate<wchar_t>; extern template class collate_byname<wchar_t>; extern template const collate<wchar_t>& use_facet<collate<wchar_t> >(const locale&); extern template bool has_facet<collate<wchar_t> >(const locale&); #endif #endif _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif
Upload File
Create Folder