1. abudden
  2. TagHighlight

Commits

abudden  committed 436ae06

Included Kévin Brodsky's libc/libc++ generation scripts.

Originally from https://github.com/Corax26/TagHL_libc-cpp: the versions in here
were modified from ad4472b7a9eb3bbc1072ceceb5407bd84533dbbd. The C++ library
code is only based on C++0x, not C++11 as I generated these on a server that
only had gcc 4.6.

Modifications to the github version as follows:

* Added copyright notice.
* Use GCC to find the include search path (crude but effective, at least for
English language versions of GCC).
* Fall-back code for versions of GCC that don't support -std=c++11
* Shortened the library names to make it easier to use them in the configuration
option "ForcedStandardLibraries"
* Modified the library REs to be slightly closer to the C standard.

  • Participants
  • Parent commits 24747b1
  • Branches default

Comments (0)

Files changed (12)

File doc/TagHighlight.txt

View file
 	the available standard libraries are:
 
 	* "Android SDK": Android Software Development Kit (Java)
+	* "C POSIX Library": Standard POSIX libc (C)
+	* "C++ Standard Library": Standard C++ library - libc++ (C++)
 	* "JDK": Java Development Kit (Java)
 	* "PySide": PySide framework (Python; limited support)
 	* "Qt4": Qt4 (C++)
 	in the first place), or by setting |TagHL-DisableStandardLibraries| to
 	True or 1.
 
+	Thanks to Kévin Brodsky for providing the scripts to generate the libc and
+	libc++ libraries.
+
 ------------------------------------------------------------------------------
 
 3.2 Adding More Standard Libraries       *TagHighlight-adding-libraries*    {{{2
 	* File-scope variables are only highlighted in the file in which their
 	  scope is valid (thanks to Kévin Brodsky for the suggestion).  An option
 	  called IgnoreFileScope disables this feature.
+	* New standard highlighting libraries: libc and libc++ (thanks to Kévin
+	  Brodsky for producing the scripts that generate these libraries).
 	
 	Bug fixes:
 	

File plugin/TagHighlight/standard_libraries/libc++/c++_headers.txt

View file
+/usr/include/c++/4.7.2/algorithm           
+/usr/include/c++/4.7.2/array               
+/usr/include/c++/4.7.2/atomic              
+/usr/include/c++/4.7.2/bitset              
+/usr/include/c++/4.7.2/chrono              
+/usr/include/c++/4.7.2/complex             
+/usr/include/c++/4.7.2/condition_variable  
+/usr/include/c++/4.7.2/deque               
+/usr/include/c++/4.7.2/exception           
+/usr/include/c++/4.7.2/forward_list        
+/usr/include/c++/4.7.2/fstream           
+/usr/include/c++/4.7.2/functional        
+/usr/include/c++/4.7.2/future            
+/usr/include/c++/4.7.2/initializer_list  
+/usr/include/c++/4.7.2/iomanip           
+/usr/include/c++/4.7.2/ios               
+/usr/include/c++/4.7.2/iosfwd            
+/usr/include/c++/4.7.2/iostream          
+/usr/include/c++/4.7.2/istream           
+/usr/include/c++/4.7.2/iterator          
+/usr/include/c++/4.7.2/limits            
+/usr/include/c++/4.7.2/list     
+/usr/include/c++/4.7.2/locale   
+/usr/include/c++/4.7.2/map      
+/usr/include/c++/4.7.2/memory   
+/usr/include/c++/4.7.2/mutex    
+/usr/include/c++/4.7.2/new      
+/usr/include/c++/4.7.2/numeric  
+/usr/include/c++/4.7.2/ostream  
+/usr/include/c++/4.7.2/queue    
+/usr/include/c++/4.7.2/random   
+/usr/include/c++/4.7.2/ratio    
+/usr/include/c++/4.7.2/regex         
+/usr/include/c++/4.7.2/set           
+/usr/include/c++/4.7.2/sstream       
+/usr/include/c++/4.7.2/stack         
+/usr/include/c++/4.7.2/stdexcept     
+/usr/include/c++/4.7.2/streambuf     
+/usr/include/c++/4.7.2/string        
+/usr/include/c++/4.7.2/system_error
+/usr/include/c++/4.7.2/thread
+/usr/include/c++/4.7.2/tuple
+/usr/include/c++/4.7.2/typeindex
+/usr/include/c++/4.7.2/typeinfo
+/usr/include/c++/4.7.2/type_traits
+/usr/include/c++/4.7.2/unordered_map
+/usr/include/c++/4.7.2/unordered_set
+/usr/include/c++/4.7.2/utility
+/usr/include/c++/4.7.2/valarray
+/usr/include/c++/4.7.2/vector
+/usr/include/c++/4.7.2/cassert   
+/usr/include/c++/4.7.2/ccomplex  
+/usr/include/c++/4.7.2/cctype    
+/usr/include/c++/4.7.2/cerrno    
+/usr/include/c++/4.7.2/cfenv     
+/usr/include/c++/4.7.2/cfloat    
+/usr/include/c++/4.7.2/cinttypes  
+/usr/include/c++/4.7.2/ciso646    
+/usr/include/c++/4.7.2/climits    
+/usr/include/c++/4.7.2/clocale    
+/usr/include/c++/4.7.2/cmath      
+/usr/include/c++/4.7.2/csetjmp    
+/usr/include/c++/4.7.2/csignal    
+/usr/include/c++/4.7.2/cstdalign  
+/usr/include/c++/4.7.2/cstdarg    
+/usr/include/c++/4.7.2/cstdbool   
+/usr/include/c++/4.7.2/cstddef    
+/usr/include/c++/4.7.2/cstdint    
+/usr/include/c++/4.7.2/cstdio   
+/usr/include/c++/4.7.2/cstdlib  
+/usr/include/c++/4.7.2/cstring
+/usr/include/c++/4.7.2/ctgmath
+/usr/include/c++/4.7.2/ctime
+/usr/include/c++/4.7.2/cwchar
+/usr/include/c++/4.7.2/cwctype

File plugin/TagHighlight/standard_libraries/libc++/gen_libc++.sh

View file
+#!/bin/bash
+# Script for generating libc++ standard library highlighter.  Written by Kévin Brodsky.
+# with (very minor) amendments by A. Budden
+# Copyright (C) 2013 Kévin Brodsky
+
+#Hack to be done (see folder modified_cpp_headers): 
+#	* erase class bitset implementation (bitset header)
+#	* hack template of __detail::_Shift ('__w <' => '__w ==') (bits/random.h header)
+#	* same for struct __static_sign and struct __big_less (ratio header)
+
+TAGS=libc++_tags
+TYPES=libc++.taghl
+HEADERS=c++_headers.txt
+declare -A bits_headers
+
+# Use GCC to find search path - this may only work on English language builds!
+cat > TAGHL_GCC_TEST.cpp <<EOF
+#include <vector>
+int main(void)
+{
+	return 0;
+}
+EOF
+SEARCH_PATH=$(gcc -o a.out -v TAGHL_GCC_TEST.cpp 2>&1 \
+	| grep -A 10000 "^#include.*search starts here:" \
+	| grep -B 10000 "^End of search list." \
+	| grep "^ " \
+	| sed 's/^ //')
+if $(g++ -std=c++11 TAGHL_GCC_TEST.cpp >/dev/null 2>&1)
+then
+	COPT="-std=c++11"
+elif $(g++ -std=c++0x TAGHL_GCC_TEST.cpp >/dev/null 2>&1)
+then
+	COPT="-std=c++0x"
+else
+	COPT=""
+fi
+rm a.out TAGHL_GCC_TEST.cpp
+echo Search path set to:
+echo ${SEARCH_PATH}
+
+rm -f $TAGS
+echo Generating $TAGS file
+while read header
+do
+	echo Parsing $header
+	if [ ! -e $header ]
+	then
+		for path in ${SEARCH_PATH}
+		do
+			echo "Trying ${path}"
+			if [ -e ${path}/$(basename $header) ]
+			then
+				header=${path}/$(basename $header)
+				echo "Success"
+				break
+			fi
+		done
+	fi
+
+	if `g++ -E ${COPT} -x c++-header $header > tmp.h`
+	then
+		ctags -f $TAGS --append=yes --excmd=number\
+			--c++-kinds=+p  --c++-kinds=-m --extra=+q --fields=+iaS --language-force=c++ \
+			--line-directives=yes -I noexcept -I static_assert+ tmp.h
+		# Note, no x in c++-kinds: a bug in ctags prevents it from generating entries for extern declarations
+		# inside a namespace (but there are tons of useless extern template/class declarations
+		# so it's better to fully disable externs)
+		ctags -f $TAGS --append=yes --excmd=number\
+			--c++-kinds=d --language-force=c++ --line-directives=yes $header
+		for h in `g++ -M ${COPT} -x c++-header $header | grep -oE '(\S*/bits/\S*)|(/usr/include/[a-z.]*\s)'`
+		do 
+			bits_headers[$h]=1
+		done
+	else
+		echo Header not found
+	fi
+done < $HEADERS
+
+echo
+echo "Parsing bits for additional macros (${#bits_headers[@]} headers)"
+for h in ${!bits_headers[@]}
+do
+	echo Parsing $h
+	ctags -f $TAGS --append=yes --excmd=number --c++-kinds=d \
+	--language-force=c++ $h
+done
+
+echo Deleting _identifiers and removing duplicates
+vim -c 'g/\v::_|^_/d' -c 'g/\%(^\1\>.*$\n\)\@<=\(\k\+\).*$/d' -c 'wq' $TAGS
+
+
+echo Hacking $TAGS: adding .h to standard unsuffixed C++ headers...
+vim -c '%s/\v(\/usr\S*)(\.h)@<!\t/\1.h\t/g' -c 'wq' $TAGS
+
+echo Generating $TYPES
+vim -c "let g:TagHighlightSettings['TypesFileNameForce']='$TYPES'" \
+	-c "let g:TagHighlightSettings['Languages']=['c']" \
+	-c "let g:TagHighlightSettings['TagFileName']='$TAGS'" \
+	-c "UpdateTypesFileOnly" \
+	-c "q"
+
+# Because of the aforementioned ctags extern in namespace bug, manually add the few true
+# C++ extern & C extern (extracted from libc_posix.taghl)
+sed -i '1s/^/syn keyword CTagsExtern cin cout cerr clog wcin wcout wcerr wclog nothrow\nsyn keyword CTagsExtern stdout optind sys_siglist sigevent daylight gdbm_version timezone sys_nerr gdbm_errno tm optopt in6addr_any optarg gdbm_errlist re_syntax_options opterr rusage stdin sys_errlist signgam tzname stderr in6addr_loopback gdbm_version_number\n/' $TYPES 
+
+echo Done
+
+# vim: fenc=utf-8

File plugin/TagHighlight/standard_libraries/libc++/libc++.taghl

View file
+syn keyword CTagsExtern cin cout cerr clog wcin wcout wcerr wclog nothrow
+syn keyword CTagsExtern stdout optind sys_siglist sigevent daylight gdbm_version timezone sys_nerr gdbm_errno tm optopt in6addr_any optarg gdbm_errlist re_syntax_options opterr rusage stdin sys_errlist signgam tzname stderr in6addr_loopback gdbm_version_number
+syn keyword CTagsStructure has_virtual_destructor default_delete less is_fundamental adopt_lock_t rebind is_union atomic output_iterator_tag iterator_traits random_data equal_to integral_constant tm is_scalar binary_function remove_all_extents remove_cv siginfo greater is_member_object_pointer is_void is_abstract add_cv remove_pointer is_error_code_enum is_floating_point ucontext error_code bidirectional_iterator_tag defer_lock_t is_const timespec bit_and is_class logical_and is_error_condition_enum
+syn keyword CTagsStructure is_same is_enum is_lvalue_reference sigaltstack hash allocator_arg_t error_condition is_compound forward_iterator_tag extent is_object is_integral sigaction is_reference timex plus less_equal multiplies nothrow_t rank add_rvalue_reference negate remove_reference auto_ptr_ref is_array remove_volatile sigvec sigevent add_const sigstack is_member_pointer greater_equal unary_function sigcontext owner_less type_index is_arithmetic is_volatile sched_param minus numeric_limits
+syn keyword CTagsStructure alignment_of logical_or itimerspec add_volatile remove_extent remove_const uses_allocator drand48_data once_flag add_lvalue_reference timeval add_pointer is_pointer modulus divides is_bind_expression is_rvalue_reference try_to_lock_t bit_or input_iterator_tag is_empty lconv bit_xor logical_not not_equal_to is_function random_access_iterator_tag atomic_bool is_polymorphic is_member_function_pointer
+syn keyword CTagsUnion sigval
+syn keyword CTagsEnumeratorName float_round_style memory_order float_denorm_style
+syn keyword CTagsEnumerationValue SI_MESGQ REG_ECX BUS_ADRERR PTHREAD_MUTEX_FAST_NP REG_EAX memory_order_acquire FE_DIVBYZERO REG_DS REG_EBP REG_TRAPNO SI_KERNEL REG_EBX FE_UNDERFLOW PTHREAD_MUTEX_ERRORCHECK round_to_nearest CLD_DUMPED FP_NORMAL FP_NAN PTHREAD_CANCEL_DISABLE REG_ESI PTHREAD_SCOPE_SYSTEM REG_ESP PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_SCOPE_PROCESS ILL_ILLOPC memory_order_release PTHREAD_CREATE_JOINABLE FPE_FLTSUB REG_SS ILL_PRVOPC round_indeterminate FE_TOWARDZERO SIGEV_NONE SS_DISABLE
+syn keyword CTagsEnumerationValue FE_TONEAREST REG_EIP SS_ONSTACK PTHREAD_MUTEX_ADAPTIVE_NP TRAP_BRKPT SEGV_MAPERR FPE_INTDIV PTHREAD_RWLOCK_DEFAULT_NP ILL_ILLOPN FP_INFINITE POLL_ERR denorm_absent FE_INVALID SEGV_ACCERR CLD_CONTINUED PTHREAD_MUTEX_DEFAULT CLD_TRAPPED REG_UESP PTHREAD_PRIO_NONE PTHREAD_PROCESS_PRIVATE ILL_ILLADR denorm_indeterminate FP_SUBNORMAL CLD_STOPPED POLL_MSG CLD_KILLED round_toward_zero FPE_FLTUND memory_order_relaxed POLL_PRI PTHREAD_RWLOCK_PREFER_READER_NP PTHREAD_CANCEL_ENABLE
+syn keyword CTagsEnumerationValue SI_SIGIO PTHREAD_MUTEX_STALLED_NP SI_USER PTHREAD_INHERIT_SCHED ILL_PRVREG PTHREAD_PROCESS_SHARED FPE_FLTOVF PTHREAD_MUTEX_RECURSIVE PTHREAD_CREATE_DETACHED PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP FPE_FLTINV PTHREAD_EXPLICIT_SCHED FPE_FLTDIV ILL_BADSTK REG_EFL SI_TKILL SIGEV_THREAD_ID SIGEV_SIGNAL SI_ASYNCIO FE_DOWNWARD PTHREAD_CANCEL_DEFERRED memory_order_acq_rel FPE_FLTRES PTHREAD_PRIO_INHERIT PTHREAD_RWLOCK_PREFER_WRITER_NP PTHREAD_MUTEX_ERRORCHECK_NP
+syn keyword CTagsEnumerationValue PTHREAD_MUTEX_NORMAL PTHREAD_MUTEX_STALLED TRAP_TRACE REG_FS FE_INEXACT ILL_ILLTRP ILL_COPROC BUS_ADRALN FP_ZERO FE_OVERFLOW round_toward_neg_infinity FE_UPWARD PTHREAD_MUTEX_TIMED_NP POLL_IN PTHREAD_MUTEX_ROBUST_NP REG_CS REG_ERR memory_order_consume denorm_present REG_EDI FPE_INTOVF REG_ES BUS_OBJERR PTHREAD_MUTEX_ROBUST REG_GS REG_EDX round_toward_infinity SI_TIMER PTHREAD_PRIO_PROTECT memory_order_seq_cst SIGEV_THREAD POLL_HUP PTHREAD_CANCEL_ASYNCHRONOUS CLD_EXITED
+syn keyword CTagsEnumerationValue POLL_OUT SI_QUEUE SI_ASYNCNL
+syn keyword CTagsFunction code revoke nearbyint pthread_mutex_getprioceiling iscntrl_l getc_unlocked wcpncpy pthread_barrier_destroy freopen64 sigwait sleep pthread_condattr_getpshared sigaddset acosh isxdigit pthread_getconcurrency group_member pthread_key_delete pthread_testcancel timer_settime getresgid pthread_attr_getscope ilogb pow10 qecvt bind2nd sched_setparam swap pop_back pthread_setname_np getline bind1st pthread_attr_getaffinity_np rand_r getpt iswupper_l ctime_r mkstemps
+syn keyword CTagsFunction pthread_rwlockattr_destroy getppid atomic_fetch_sub_explicit getloadavg chdir iswblank_l fetch_add seteuid strcasecmp_l pthread_mutex_lock siglongjmp tcsetpgrp pthread_mutex_consistent_np pthread_barrierattr_setpshared sched_get_priority_max pthread_timedjoin_np setlogin nested_ptr uninitialized_copy_n sigorset gnu_dev_makedev fputc_unlocked putchar_unlocked pthread_spin_trylock getlogin_r atomic_init nexttoward ecvt sync cosh pthread_mutex_destroy compare_exchange_weak append
+syn keyword CTagsFunction mktemp asin wcscasecmp_l getchar_unlocked pthread_attr_getschedpolicy pthread_spin_destroy ffsll y1f pthread_mutexattr_getprioceiling lseek64 access grantpt wctomb to_wstring towlower_l round_error ualarm getdate_r pthread_detach atomic_fetch_xor_explicit pthread_attr_setdetachstate exchange fmax system_category atomic_flag_clear copysign significandf localtime_r pthread_attr_init drem setregid fchdir address wcsncasecmp pthread_cond_destroy fgetws_unlocked realloc getsid trunc
+syn keyword CTagsFunction open_wmemstream pthread_mutex_setprioceiling pipe2 sethostid popen round queue is_heap_until isspace_l qecvt_r return_temporary_buffer psignal atomic_fetch_add_explicit find_last_not_of ispunct_l pthread_mutexattr_gettype bzero wcsncasecmp_l get_temporary_buffer replace substr bsd_signal sched_rr_get_interval unlockpt fmemopen max_load_factor pthread_yield pthread_getaffinity_np const_pointer_cast select pthread_equal fegetexcept seed48 canonicalize_file_name sched_yield sigreturn
+syn keyword CTagsFunction fputs_unlocked next atomic_exchange_explicit try_lock_for getwchar_unlocked isblank_l fdatasync prev setns equal_range unlink exp10 sort islower_l isatty default_error_condition atomic_compare_exchange_strong eaccess pathconf isgraph_l pthread_cond_broadcast wmempcpy wcstoll_l pthread_sigmask pthread_rwlockattr_setpshared wcstoull_l resize erand48_r fopencookie join upper_bound brk emplace_back y1l ftrylockfile mkostemps isspace erf setresuid owns_lock atomic_thread_fence jnl
+syn keyword CTagsFunction ftruncate vfork joinable compare lockf sysconf set_exception lock strftime_l ttyname_r abort wcstouq stoll strtoll tan wcstoimax lcong48 stold significandl pthread_rwlockattr_setkind_np pthread_getspecific chroot end getgroups lrand48 atanh sched_getcpu write find_first_of lower_bound on_exit putc_unlocked sin flockfile iswpunct_l atan unsetenv max clone sigsetmask sort_heap gammaf random_r setkey pthread_rwlock_wrlock pthread_join shared_ptr gammal data strcasecmp
+syn keyword CTagsFunction pthread_rwlockattr_getpshared funlockfile uninitialized_copy sigdelset strerror_r bind atomic_fetch_add pthread_attr_setschedpolicy pthread_mutex_consistent iscntrl atan2 setpgrp wctype_l srand48_r strerror_l pthread_tryjoin_np set_new_handler pthread_rwlock_timedwrlock strsep static_pointer_cast syncfs memfrob getdomainname move_backward move execle top stod jnf strtoul ferror_unlocked y1 execlp hardware_concurrency before strtol_l open_memstream getsubopt obstack_printf
+syn keyword CTagsFunction compare_exchange_strong getpid mkostemps64 feof_unlocked remquo posix_memalign readlinkat sched_get_priority_min stoul fchown pthread_rwlock_unlock pow10f front detach pow10l set_value execl has_facet siggetmask name wcscasecmp ynf setreuid gcvt getdelim pthread_cancel merge uncaught_exception fmod try_lock allocate_shared execv setstate pthread_mutexattr_settype clock_gettime fill_n pthread_mutexattr_init sched_getaffinity fetch_sub pthread_attr_setstack isalnum_l pop_heap logb
+syn keyword CTagsFunction yield fileno_unlocked pthread_create infinity unique_ptr ttyname target_type category initstate_r isdigit_l putwc_unlocked generic_category atomic_fetch_or_explicit profil setsid fedisableexcept get pthread_attr_setstacksize pthread_setcancelstate mrand48_r swap_ranges iswspace_l usleep pthread_rwlock_destroy log2 asprintf wcschrnul getcwd free labs base asctime_r sigignore qsort_r remainder vhangup advance expm1 fseeko basic_string thread pthread_condattr_setpshared get_allocator
+syn keyword CTagsFunction length sigandset erfc pwrite64 islower pthread_rwlock_rdlock isupper assign pthread_condattr_init rand ssignal atomic_compare_exchange_strong_explicit rint valloc bcopy swab pthread_attr_getstacksize ldexp unexpected sigpending acct message size strtoull_l atomic_flag_clear_explicit wcsnlen isalnum duplocale exp2 strtoll_l qsort system construct tcgetpgrp fsetpos64 faccessat isalpha strfry unlinkat dprintf mkstemp64 ecvt_r pthread_attr_getguardsize confstr setbuffer wctrans_l
+syn keyword CTagsFunction ttyslot llrint mkostemp atomic_load hash_function sigrelse copy make_heap strtouq distance pthread_barrier_wait target lcong48_r isalpha_l quick_exit atomic_compare_exchange_weak_explicit atomic_fetch_and store get_deleter use_facet fexecve fma call_once y0l gmtime_r lowest rend rethrow_if_nested pthread_attr_getstackaddr strtok_r pselect getpass sigfillset stpcpy pthread_once euidaccess pthread_atfork wait_for atomic_fetch_or min wcscoll_l geteuid native_handle get_future
+syn keyword CTagsFunction strptime get_current_dir_name pthread_attr_destroy iswdigit_l destroy realpath begin getlogin pthread_barrier_init significand make_exception_ptr pthread_setschedprio inserter what pthread_spin_unlock getwc_unlocked capacity iswprint_l pthread_cond_init value pthread_barrierattr_init not1 srand48 pthread_rwlock_tryrdlock not2 alarm pipe pthread_barrierattr_destroy strtold_l exp fseeko64 pthread_attr_getdetachstate setlinebuf push_front reserve strncasecmp pthread_getattr_np
+syn keyword CTagsFunction obstack_vprintf isprint_l a64l random terminate rbegin timegm nrand48_r strtoull pthread_setconcurrency toupper_l find strtol pause pthread_attr_setaffinity_np iter_swap strtod lrint fgetpos64 lockf64 lexicographical_compare pthread_mutex_init frexp lrand48_r strtof_l iswlower_l find_first_not_of pthread_mutex_trylock strtoq reset l64a dup3 dup2 ffs ceil stol bcmp pthread_mutexattr_setrobust stoi getpgrp sqrt ptsname_r stof strtod_l sigwaitinfo fileno vdprintf srandom
+syn keyword CTagsFunction pthread_getschedparam strncasecmp_l is_lock_free remove pwrite pthread_cond_wait dremf dysize wcstoul_l release sigismember posix_openpt copy_backward valid feenableexcept set_terminate mbtowc mkdtemp iswgraph_l pthread_attr_getinheritsched pthread_kill j0 j1 make_error_code qgcvt atexit fchownat tolower_l y0 close jrand48 lgammaf_r emplace isxdigit_l wcsnrtombs setpgid atomic_store atomic_compare_exchange_weak state mutex lgammal_r y0f freelocale clock_getres
+syn keyword CTagsFunction pthread_setcanceltype pthread_rwlock_timedrdlock dynamic_pointer_cast strxfrm_l pthread_mutexattr_getprotocol scalbln setresgid timelocal auto_ptr cbegin jn stime getdtablesize pthread_attr_setguardsize atomic_store_explicit tmpnam_r seed48_r cos reverse rethrow_exception equal rfind atomic_fetch_xor sysv_signal isascii isctype sigemptyset timer_getoverrun load sigqueue tzset setstate_r fflush_unlocked vasprintf pow back_inserter pop push_back tmpfile64 pread pthread_spin_init
+syn keyword CTagsFunction putw gethostname clearerr_unlocked nanosleep gnu_dev_major strtoimax dup wait fcvt_r ftruncate64 tgamma asinh rethrow_nested front_inserter execvpe execvp pthread_attr_setinheritsched j0f get_id stpncpy unshare pthread_attr_setschedparam wcswidth towctrans_l execve splice pthread_attr_setstackaddr drand48 pthread_getname_np setgid notify_one lgamma qfcvt lgamma_r fputwc_unlocked strptime_l clearenv pread64 setuid pthread_mutexattr_setprotocol malloc signaling_NaN cfree srand
+syn keyword CTagsFunction fwrite_unlocked wcwidth getwd pthread_getcpuclockid pthread_spin_lock make_shared pthread_attr_setscope to_string iswxdigit_l sched_getparam fabs strnlen yn qfcvt_r read uselocale pthread_mutex_timedlock copy_exception nextafter getw pthread_mutexattr_getrobust gsignal pthread_mutexattr_setrobust_np push_heap try_lock_until getusershell pthread_condattr_setclock isgraph pthread_attr_getstack clock_getcpuclockid calloc encrypt strcoll_l set_unexpected stack max_size denorm_min
+syn keyword CTagsFunction clock_adjtime wcstombs drand48_r iswcntrl_l sigblock nrand48 is_heap wcstoumax atomic_is_lock_free fopen64 truncate64 mempcpy pthread_mutexattr_setprioceiling setdomainname lseek wcpcpy fputws_unlocked mkstemps64 find_last_of atomic_signal_fence kill pthread_condattr_destroy pthread_mutexattr_getpshared dreml shared_from_this wcstoq atoll pthread_mutexattr_getrobust_np key_comp sethostname ldiv timer_delete pop_front ptsname setenv lchown cbrt uninitialized_fill_n sigisemptyset
+syn keyword CTagsFunction pthread_rwlockattr_init ynl iswalpha_l scalbf exp10l sleep_until imaxabs scalbl scalbn exp10f srandom_r toascii wcsxfrm_l iswctype_l unique throw_with_nested gnu_dev_minor insert daemon renameat fsync uninitialized_fill newlocale requested_size fgetwc_unlocked mblen setegid symlinkat timer_create async fread_unlocked signal putwchar_unlocked tempnam strsignal lldiv toupper rpmatch emplace_front mrand48 back stoull pthread_attr_getschedparam getresuid erase wcstod_l notify_all
+syn keyword CTagsFunction getgid ctermid atomic_fetch_and_explicit tolower scalb sched_setaffinity fgetc_unlocked clock_settime exit allocate pthread_setspecific deallocate mbstowcs sighold getpagesize pthread_exit modf pthread_rwlock_trywrlock equivalent matherr symlink fcloseall sigtimedwait timer_gettime atomic_flag_test_and_set kill_dependency c_str strverscmp wcsftime_l future_category siginterrupt pthread_sigqueue empty bsearch fmin llround readlink acos hash_code gamma fcvt endusershell tanh j1l
+syn keyword CTagsFunction ptr_fun linkat j1f atomic_load_explicit isprint getpgid crbegin gethostid fgets_unlocked quiet_NaN memccpy log putenv sigprocmask fdopen pthread_key_create lround cend rmdir pthread_mutexattr_destroy pthread_cond_timedwait log10 pclose clock_nanosleep fork sleep_for pthread_condattr_getclock pthread_rwlockattr_getkind_np j0l epsilon pthread_setschedparam getenv atoi link type_info atol pthread_mutex_unlock atof strdup wcstold_l getdate count wcstof_l erand48 sbrk
+syn keyword CTagsFunction pthread_cond_signal fdim flip cuserid sched_setscheduler hypot imaxdiv unlock crend pthread_rwlock_init log1p clear atomic_flag_test_and_set_explicit psiginfo llabs pthread_setaffinity_np ffsl strndup syscall pthread_barrierattr_getpshared ftello strtoumax jrand48_r initstate at wcstol_l isdigit ftello64 ispunct allocator fill isupper_l floor memmem crypt sigset pthread_mutexattr_setpshared make_error_condition getopt mkstemp remove_if nice truncate killpg shrink_to_fit mismatch
+syn keyword CTagsFunction sigsuspend towupper_l atomic_exchange sched_getscheduler setusershell getegid atomic_fetch_sub wcsdup mkostemp64 sinh strtoul_l decltype getuid wait_until fpathconf chown iswalnum_l make_move_iterator push pthread_self mbsnrtowcs
+syn keyword CTagsType cpu_set_t iterator istringstream new_handler sig_t socklen_t pthread_condattr_t int_fast32_t pthread_attr_t const_iterator FILE pthread_mutexattr_t size_t ofstream pointer iterator_type sigjmp_buf sigval_t uint8_t fpos_t fd_set atomic_uint_fast16_t blkcnt_t uint_least16_t stringbuf istream atomic_int_least16_t double_t wstringstream loff_t wofstream intptr_t off64_t string blksize_t uint_least64_t atomic_ushort unexpected_handler cookie_seek_function_t u_char fpos64_t uid_t
+syn keyword CTagsType cookie_write_function_t u_int64_t u_int16_t register_t atomic_int_least64_t key_type ifstream umode_t wint_t sigset_t float_t uint_fast16_t pthread_once_t fd_mask fsfilcnt_t cookie_close_function_t atomic_uintptr_t atomic_uchar first_argument_type mode_t reference comparison_fn_t u16string u_short intmax_t int16_t clock_t u_int32_t mcontext_t cookie_io_functions_t mbstate_t siginfo_t u32string ucontext_t uint_fast32_t int_least8_t wostringstream div_t mutex_type id_t atomic_ptrdiff_t
+syn keyword CTagsType ldiv_t int_least16_t va_list uint_least8_t pthread_barrier_t iostream pthread_rwlock_t u32streampos atomic_int_least8_t wstreambuf atomic_ulong value_type atomic_schar streambuf fpregset_t jmp_buf fstream atomic_intmax_t atomic_uint_least8_t atomic_uint_fast8_t ushort wfilebuf atomic_llong clockid_t element_type atomic_uint_fast32_t atomic_char caddr_t ino_t uint_fast8_t wostream atomic_int_least32_t atomic_uint_least64_t difference_type atomic_short streamsize pthread_spinlock_t
+syn keyword CTagsType stringstream atomic_uint_least32_t const_reference const_pointer pthread_rwlockattr_t u_quad_t u16streampos atomic_char16_t atomic_ullong fsfilcnt64_t atomic_int_fast8_t container_type time_t daddr_t ino64_t stack_t wstreampos atomic_uintmax_t uint_least32_t int_least64_t type wstringbuf uintptr_t atomic_int atomic_int_fast16_t true_type sighandler_t int8_t ostringstream deleter_type int32_t gid_t pthread_barrierattr_t false_type atomic_wchar_t pid_t terminate_handler timer_t quad_t
+syn keyword CTagsType nullptr_t u_long mapped_type wifstream atomic_intptr_t allocator_type cookie_read_function_t pthread_key_t wctrans_t uint64_t wistream blkcnt64_t u_int8_t wstring wctype_t pthread_cond_t streampos second_argument_type atomic_int_fast32_t atomic_uint_least16_t uintmax_t off_t atomic_uint_fast64_t wfstream atomic_size_t wios int64_t int_fast16_t const_reverse_iterator reverse_iterator greg_t sig_atomic_t pthread_t nlink_t argument_type imaxdiv_t atomic_uint error_t gregset_t other
+syn keyword CTagsType fsblkcnt64_t size_type wistringstream filebuf int_fast64_t int_fast8_t atomic_long iterator_category fsid_t uint32_t ulong native_handle_type ptrdiff_t ios fexcept_t sigevent_t key_t uint u_int useconds_t ostream hasher locale_t int_least32_t uint_fast64_t fenv_t uint16_t atomic_int_fast64_t lldiv_t streamoff suseconds_t pthread_mutex_t atomic_char32_t ssize_t dev_t fsblkcnt_t result_type wiostream
+syn keyword CTagsDefinedName wcsftime LC_TELEPHONE_MASK EOF math_errhandling STA_PPSWANDER fclose M_LOG10E LONG_MIN acosl ADJ_ESTERROR expm1f CPU_FREE acosf USHRT_MAX expm1l log2f const log2l mktime va_end CLONE_IO MOD_STATUS SIGXFSZ localtime ENOTSUP scalbnf SHRT_MAX fesetround INT_FAST16_MIN scalbnl islessgreater vswprintf cbrtl CLOCK_MONOTONIC_COARSE truncl LC_TIME_MASK sigsetjmp CPU_SET_S M_PI atan2f htole32 SIGSTOP stderr iswspace div INT_LEAST8_MIN isblank ldexpl M_PI_2 cosf INT_FAST64_MIN M_PI_4
+syn keyword CTagsDefinedName cosl SA_INTERRUPT SIGWINCH isfinite iswlower ilogbf UINTMAX_C ADJ_OFFSET_SINGLESHOT NL_SETMAX nanl clock UINT_FAST32_MAX M_E nanf SIGTRAP SIGILL CLONE_SYSVSEM llroundl NGROUPS_MAX modff LC_ADDRESS_MASK ldexpf llroundf WORD_BIT CLONE_FS fabsf isascii_l MB_LEN_MAX be64toh UINT16_C gmtime sinl CPU_OR mbsinit CLONE_DETACHED sinf CLOCK_REALTIME_COARSE acoshl htobe64 SV_ONSTACK fputws CLONE_CHILD_SETTID lroundl CLOCK_THREAD_CPUTIME_ID M_LN10 fputwc w_termsig SCHAR_MAX iswalnum
+syn keyword CTagsDefinedName BC_STRING_MAX SIGSYS ERFKILL wcstok wcstol vswscanf SIGXCPU printf wcstod wcstof getchar NR_OPEN fdimf LC_MONETARY feupdateenv fdiml INTPTR_MIN sigev_notify_attributes fesetexceptflag isless MOD_FREQUENCY FE_ALL_EXCEPT M_2_SQRTPIl isunordered ADJ_NANO wcsncpy CLOCK_REALTIME_ALARM nexttowardl PTRDIFF_MAX STA_PPSFREQ wcscspn SCHED_FIFO INT32_MIN LC_ALL_MASK BIG_ENDIAN UNDERFLOW llrintf SA_ONESHOT WCONTINUED INT_LEAST32_MAX strerror CLONE_NEWUTS SA_NOMASK STA_PLL signbit F_TLOCK
+syn keyword CTagsDefinedName HUGE_VAL ADJ_OFFSET_SS_READ CLONE_UNTRACED INT_FAST8_MAX wprintf M_1_PI M_1_PIl CLONE_PARENT_SETTID STA_DEL strtold swprintf fprintf LC_CTYPE_MASK M_LN2l wcscmp SIGCLD si_overrun STA_PPSTIME towupper WCHAR_MIN strncat HUGE clearerr atanf M_2_PI feof atanl CSIGNAL strcpy rewind wmemchr wcsrchr INT_FAST8_MIN UINT32_C WEXITED INFINITY LINE_MAX FP_FAST_FMAL L_XTND WINT_MIN CPU_COUNT_S SA_SIGINFO LC_ALL SIGVTALRM CLONE_NEWNS feraiseexcept gettext ATOMIC_CHAR16_T_LOCK_FREE M_PI_4l
+syn keyword CTagsDefinedName LC_TELEPHONE wctob ADJ_OFFSET wcsncmp CPU_ISSET NL_MSGMAX le32toh CLONE_VFORK wmemmove coshl UINT8_MAX CLOCK_BOOTTIME_ALARM LC_CTYPE btowc mbrlen finitef STA_INS SIGPROF finitel si_ptr SIGPOLL SIG_BLOCK ADJ_FREQUENCY INT_LEAST16_MAX STDC_HEADERS LONG_MAX F_OK STA_FREQHOLD SA_RESETHAND AIO_PRIO_DELTA_MAX ECANCELED CPU_COUNT SIGSTKFLT sigpause LITTLE_ENDIAN sprintf perror TMP_MAX strcoll SCHED_BATCH vfwscanf gets INTMAX_MIN CPU_AND M_SQRT1_2l M_LN10l UINT_FAST8_MAX L_SET
+syn keyword CTagsDefinedName DELAYTIMER_MAX HOST_NAME_MAX dgettext memchr si_fd LC_NUMERIC SCHAR_MIN INT_FAST64_MAX PTHREAD_STACK_MIN logf FE_NOMASK_ENV sinhf LC_MESSAGES_MASK logl UCHAR_MAX LT_OBJDIR WIFSIGNALED sinhl PTHREAD_MUTEX_INITIALIZER assert_perror LC_MEASUREMENT sqrtf vfwprintf sigcontext_struct atan2l vscanf strrchr SIGALRM STA_CLOCKERR si_uid CHAR_BIT ADJ_MAXERROR toascii_l ferror vwscanf strdupa copysignf si_timerid fwide putchar wcsspn WUNTRACED sa_handler htobe16 STA_PPSSIGNAL erff
+syn keyword CTagsDefinedName STA_RONLY isinff erfl scanf PTHREAD_DESTRUCTOR_ITERATIONS floorf M_PIl floorl optional_argument ATOMIC_SHORT_LOCK_FREE setbuf strncpy CHARCLASS_NAME_MAX FP_ILOGB0 snprintf iswxdigit INT8_MIN copysignl M_LOG2E le16toh UINT_LEAST64_MAX CPU_CLR_S L_ctermid UINT_FAST64_MAX fpclassify CPU_XOR STA_FLL nearbyintf SCHED_OTHER memcmp CPU_SETSIZE MAXFLOAT BC_DIM_MAX sigmask SIG_UNBLOCK INT32_MAX fscanf CLONE_FILES LC_COLLATE INT_LEAST64_MIN PTHREAD_COND_INITIALIZER wcscpy PTRDIFF_MIN
+syn keyword CTagsDefinedName ULONG_MAX expl ARG_MAX w_coredump SA_STACK SEEK_DATA INT64_C vsnprintf EDOM SIGFPE CLONE_SETTLS NL_ARGMAX EILSEQ PDP_ENDIAN sincos SING wmemcpy iswgraph ADJ_STATUS putwchar fseek STA_CLK CPU_AND_S CLOCKS_PER_SEC WNOWAIT frexpl iswalpha cbrtf frexpf RE_DUP_MAX strchr SCHED_RESET_ON_FORK STA_MODE LOGIN_NAME_MAX setjmp HUGE_VALF strpbrk logbf SA_NODEFER wcstold wscanf logbl INTPTR_MAX wcstoll SIGRTMIN CLONE_NEWNET powf si_value WINT_MAX wcstoul wcsstr BC_SCALE_MAX STA_PPSERROR
+syn keyword CTagsDefinedName MATH_ERRNO setvbuf vfprintf WTERMSIG sv_onstack PTHREAD_CANCELED SIGTSTP F_ULOCK INT_LEAST8_MAX UINT8_C LC_PAPER pthread_cleanup_pop_restore_np ATOMIC_CHAR32_T_LOCK_FREE FLT_EVAL_METHOD fputc INTMAX_C strtok strtof ADJ_MICRO MOD_OFFSET fputs abs SSIZE_MAX TEMP_FAILURE_RETRY UINTMAX_MAX lgammaf wmemset iswctype wcscoll SIG_ERR NZERO lgammal M_LN2 UINT_MAX truncf erfcl memcpy no_argument CPU_OR_S si_stime islessequal FOPEN_MAX CHAR_MIN INTMAX_MAX fgetwc PTHREAD_RWLOCK_INITIALIZER
+syn keyword CTagsDefinedName INT64_MIN wcschr CLONE_PARENT EXPR_NEST_MAX ADJ_TICK SIGTTIN fgetws strncmp be32toh nextafterl SIGQUIT nextafterf M_2_PIl strcat LINK_MAX putwc si_status UINT_LEAST32_MAX MINSIGSTKSZ CPU_SET isnan memset STA_NANO PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP strcspn fgetpos MOD_ESTERROR UINT32_MAX vwprintf CPU_ZERO F_LOCK WIFCONTINUED M_SQRT2l SIG_SETMASK STA_PPSJITTER CLOCK_BOOTTIME SA_RESTART pthread_cleanup_push si_utime lrintl getwchar ilogbl ADJ_TIMECONST SIGPIPE
+syn keyword CTagsDefinedName ungetwc X_TLOSS CLONE_VM atanhl LC_IDENTIFICATION CLONE_PTRACE atanhf DECIMAL_DIG PTHREAD_ONCE_INIT STDERR_FILENO expf PLOSS UINTPTR_MAX fwrite htole16 LC_TIME strftime SA_ONSTACK INT16_C acoshf fmaxf L_tmpnam strxfrm fmaxl CLONE_SIGHAND alloca INT_LEAST64_MAX sscanf MOD_MICRO PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP hypotf htole64 SIGKILL NSIG puts SIGSEGV hypotl fmal SIGUSR1 SIGINT PTHREAD_BARRIER_SERIAL_THREAD SCHED_IDLE FP_ILOGBNAN MOD_CLKB MOD_CLKA EOWNERDEAD M_2_SQRTPI
+syn keyword CTagsDefinedName sched_priority fminl mbrtowc asinl PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP SIG_ATOMIC_MAX tmpnam asinf WSTOPSIG assert WNOHANG pthread_cleanup_pop mbsrtowcs ATOMIC_VAR_INIT OPEN_MAX FILENAME_MAX L_cuserid lroundf UINT16_MAX SIGUNUSED tanl EXIT_SUCCESS scalblnf ULLONG_MAX tanf scalblnl swscanf FE_DFL_ENV CLONE_NEWPID vsscanf fegetenv sigev_notify_function vsprintf CPU_EQUAL rename log10l SIG_ATOMIC_MIN stdout PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP log10f W_OK SEEK_HOLE R_OK
+syn keyword CTagsDefinedName getwc wcsxfrm INT32_C STDIN_FILENO wcspbrk COLL_WEIGHTS_MAX INT_FAST16_MAX tanhf dngettext getc INT_LEAST16_MIN towlower finite ceilf longjmp ceill SEEK_SET STA_UNSYNC SIZE_MAX INT_MAX UINT_LEAST16_MAX isnanf isinfl UINT64_MAX LC_GLOBAL_LOCALE isnanl SIGRTMAX LLONG_MIN NULL qfpclass iswprint INT_FAST32_MAX w_stopsig CPU_CLR UINT_FAST16_MAX powl M_LOG10El wcrtomb fetestexcept LC_MONETARY_MASK fpclass be16toh WSTOPPED rintf w_retcode wmemcmp fesetenv NAN INT16_MIN rintl wctrans
+syn keyword CTagsDefinedName MOD_TIMECONST SIGBUS NL_NMAX CHAR_MAX fflush pthread_cleanup_push_defer_np INT64_MAX isnormal LC_COLLATE_MASK INT8_MAX SIGURG ADJ_TAI CLOCK_MONOTONIC_RAW NL_TEXTMAX RAND_MAX P_tmpdir IOV_MAX SIG_IGN SA_NOCLDWAIT SIGCHLD SHRT_MIN L_INCR LC_ADDRESS iswcntrl fegetround WIFSTOPPED M_SQRT1_2 fabsl ATOMIC_LONG_LOCK_FREE strstr ctime memmove iswpunct ATOMIC_CHAR_LOCK_FREE freopen LC_NUMERIC_MASK CLONE_THREAD modfl TLOSS strcmp stdin remquol CLK_TCK DOMAIN SIG_DFL fgetc
+syn keyword CTagsDefinedName ATOMIC_INT_LOCK_FREE sa_sigaction fegetexceptflag FP_FAST_FMA w_stopval fgets NL_LANGMAX M_LOG2El exp2f ERANGE exp2l fsetpos ftell asctime fmaf log1pl CLOCK_MONOTONIC tgammal isgreaterequal ENOTRECOVERABLE tgammaf CLONE_CHILD_CLEARTID LC_NAME si_int SA_NOCLDSTOP INT8_C strlen raise SEEK_END strndupa required_argument WEOF SV_RESETHAND SCHED_RR iswdigit remainderf MOD_TAI CLOCK_REALTIME MB_CUR_MAX tanhl roundl setlocale roundf WIFEXITED ATOMIC_WCHAR_T_LOCK_FREE INT16_MAX tmpfile
+syn keyword CTagsDefinedName SEEK_CUR FP_FAST_FMAF log1pf isgreater sqrtl si_pid OVERFLOW fopen HUGE_VALL CPU_ALLOC_SIZE erfcf errno localeconv M_El wcslen wcsncat ATOMIC_LLONG_LOCK_FREE towctrans SIGABRT remquof CLONE_NEWIPC fminf TIMER_ABSTIME vprintf putc feclearexcept UINT64_C ngettext htobe32 X_OK BUFSIZ TTY_NAME_MAX INT_LEAST32_MIN SIGTERM iswblank nearbyintl iswupper LC_MESSAGES UINT_LEAST8_MAX SIGPWR SEM_VALUE_MAX si_addr LC_MEASUREMENT_MASK strspn ungetc M_PI_2l SIGHUP lrintf wcstoull SIGUSR2
+syn keyword CTagsDefinedName F_TEST SIGSTKSZ fread CLONE_NEWUSER LC_IDENTIFICATION_MASK wctype WCHAR_MAX SIGIOT INT_FAST32_MIN CPU_ALLOC MOD_MAXERROR SIGCONT MOD_NANO MQ_PRIO_MAX WEXITSTATUS SV_INTERRUPT BYTE_ORDER LONG_BIT le64toh STDOUT_FILENO fwscanf CLOCK_PROCESS_CPUTIME_ID PTHREAD_THREADS_MAX nexttowardf nan SIGIO SIG_HOLD fmodf CPU_EQUAL_S wcsrtombs vfscanf si_band LC_NAME_MASK fmodl PTHREAD_KEYS_MAX sincosl time ATOMIC_FLAG_INIT coshf CPU_ZERO_S isinf fwprintf remainderl feholdexcept CPU_ISSET_S
+syn keyword CTagsDefinedName wcscat sincosf difftime CPU_XOR_S LLONG_MAX INT_MIN EXIT_FAILURE M_SQRT2 asinhf LC_PAPER_MASK MATH_ERREXCEPT llrintl BC_BASE_MAX SIGTTOU asinhl
+syn keyword CTagsClass binder1st timed_mutex vector packaged_task errc nested_exception logic_error future_status weak_ptr front_insert_iterator insert_iterator promise mem_fun_t future_errc shared_future id mem_fun1_ref_t bad_weak_ptr priority_queue pointer_to_unary_function system_error const_mem_fun_t pointer_to_binary_function recursive_timed_mutex overflow_error unary_negate condition_variable_any lock_guard const_mem_fun1_t enable_shared_from_this condition_variable future_error move_iterator
+syn keyword CTagsClass function deque underflow_error binary_negate out_of_range binder2nd bad_alloc recursive_mutex fpos runtime_error bad_function_call mem_fun1_t range_error length_error unique_lock domain_error error_category const_mem_fun_ref_t bad_typeid exception invalid_argument const_mem_fun1_ref_t bad_exception launch list raw_storage_iterator bad_cast future initializer_list new_allocator mem_fun_ref_t cv_status back_insert_iterator
+syn keyword CTagsNamespace std rel_ops this_thread
+

File plugin/TagHighlight/standard_libraries/libc++/library_types.txt

View file
+LibraryName:C++ Standard Library
+TypesFiles:libc++.taghl
+TypesSuffixes:c
+CheckMode:MatchStart
+MatchREs:
+	^\s*#\s*include\s\+<algorithm>
+	^\s*#\s*include\s\+<array>
+	^\s*#\s*include\s\+<atomic>
+	^\s*#\s*include\s\+<bitset>
+	^\s*#\s*include\s\+<chrono>
+	^\s*#\s*include\s\+<complex>
+	^\s*#\s*include\s\+<condition_variable>
+	^\s*#\s*include\s\+<deque>
+	^\s*#\s*include\s\+<exception>
+	^\s*#\s*include\s\+<forward_list>
+	^\s*#\s*include\s\+<fstream>
+	^\s*#\s*include\s\+<functional>
+	^\s*#\s*include\s\+<future>
+	^\s*#\s*include\s\+<initializer_list>
+	^\s*#\s*include\s\+<iomanip>
+	^\s*#\s*include\s\+<ios>
+	^\s*#\s*include\s\+<iosfwd>
+	^\s*#\s*include\s\+<iostream>
+	^\s*#\s*include\s\+<istream>
+	^\s*#\s*include\s\+<iterator>
+	^\s*#\s*include\s\+<limits>
+	^\s*#\s*include\s\+<list>
+	^\s*#\s*include\s\+<locale>
+	^\s*#\s*include\s\+<map>
+	^\s*#\s*include\s\+<memory>
+	^\s*#\s*include\s\+<mutex>
+	^\s*#\s*include\s\+<new>
+	^\s*#\s*include\s\+<numeric>
+	^\s*#\s*include\s\+<ostream>
+	^\s*#\s*include\s\+<queue>
+	^\s*#\s*include\s\+<random>
+	^\s*#\s*include\s\+<ratio>
+	^\s*#\s*include\s\+<regex>
+	^\s*#\s*include\s\+<set>
+	^\s*#\s*include\s\+<sstream>
+	^\s*#\s*include\s\+<stack>
+	^\s*#\s*include\s\+<stdexcept>
+	^\s*#\s*include\s\+<streambuf>
+	^\s*#\s*include\s\+<string>
+	^\s*#\s*include\s\+<system_error>
+	^\s*#\s*include\s\+<thread>
+	^\s*#\s*include\s\+<tuple>
+	^\s*#\s*include\s\+<typeindex>
+	^\s*#\s*include\s\+<typeinfo>
+	^\s*#\s*include\s\+<type_traits>
+	^\s*#\s*include\s\+<unordered_map>
+	^\s*#\s*include\s\+<unordered_set>
+	^\s*#\s*include\s\+<utility>
+	^\s*#\s*include\s\+<valarray>
+	^\s*#\s*include\s\+<vector>
+	^\s*#\s*include\s\+<cassert>
+	^\s*#\s*include\s\+<ccomplex>
+	^\s*#\s*include\s\+<cctype>
+	^\s*#\s*include\s\+<cerrno>
+	^\s*#\s*include\s\+<cfenv>
+	^\s*#\s*include\s\+<cfloat>
+	^\s*#\s*include\s\+<cinttypes>
+	^\s*#\s*include\s\+<ciso646>
+	^\s*#\s*include\s\+<climits>
+	^\s*#\s*include\s\+<clocale>
+	^\s*#\s*include\s\+<cmath>
+	^\s*#\s*include\s\+<csetjmp>
+	^\s*#\s*include\s\+<csignal>
+	^\s*#\s*include\s\+<cstdalign>
+	^\s*#\s*include\s\+<cstdarg>
+	^\s*#\s*include\s\+<cstdbool>
+	^\s*#\s*include\s\+<cstddef>
+	^\s*#\s*include\s\+<cstdint>
+	^\s*#\s*include\s\+<cstdio>
+	^\s*#\s*include\s\+<cstdlib>
+	^\s*#\s*include\s\+<cstring>
+	^\s*#\s*include\s\+<ctgmath>
+	^\s*#\s*include\s\+<ctime>
+	^\s*#\s*include\s\+<cwchar>
+	^\s*#\s*include\s\+<cwctype>
+MatchLines:50

File plugin/TagHighlight/standard_libraries/libc++/modified_cpp_headers/bits/random.h

View file
+// random number generation -*- C++ -*-
+
+// Copyright (C) 2009-2012 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/random.h
+ *  This is an internal header file, included by other library headers.
+ *  Do not attempt to use it directly. @headername{random}
+ */
+
+#ifndef _RANDOM_H
+#define _RANDOM_H 1
+
+#include <vector>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+  // [26.4] Random number generation
+
+  /**
+   * @defgroup random Random Number Generation
+   * @ingroup numerics
+   *
+   * A facility for generating random numbers on selected distributions.
+   * @{
+   */
+
+  /**
+   * @brief A function template for converting the output of a (integral)
+   * uniform random number generator to a floatng point result in the range
+   * [0-1).
+   */
+  template<typename _RealType, size_t __bits,
+	   typename _UniformRandomNumberGenerator>
+    _RealType
+    generate_canonical(_UniformRandomNumberGenerator& __g);
+
+_GLIBCXX_END_NAMESPACE_VERSION
+
+  /*
+   * Implementation-space details.
+   */
+  namespace __detail
+  {
+  _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+    template<typename _UIntType, size_t __w,
+	     bool = __w == static_cast<size_t>
+			  (std::numeric_limits<_UIntType>::digits)>
+      struct _Shift
+      { static const _UIntType __value = 0; };
+
+    template<typename _UIntType, size_t __w>
+      struct _Shift<_UIntType, __w, true>
+      { static const _UIntType __value = _UIntType(1) << __w; };
+
+    template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool>
+      struct _Mod;
+
+    // Dispatch based on modulus value to prevent divide-by-zero compile-time
+    // errors when m == 0.
+    template<typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0>
+      inline _Tp
+      __mod(_Tp __x)
+      { return _Mod<_Tp, __m, __a, __c, __m == 0>::__calc(__x); }
+
+    /*
+     * An adaptor class for converting the output of any Generator into
+     * the input for a specific Distribution.
+     */
+    template<typename _Engine, typename _DInputType>
+      struct _Adaptor
+      {
+
+      public:
+	_Adaptor(_Engine& __g)
+	: _M_g(__g) { }
+
+	_DInputType
+	min() const
+	{ return _DInputType(0); }
+
+	_DInputType
+	max() const
+	{ return _DInputType(1); }
+
+	/*
+	 * Converts a value generated by the adapted random number generator
+	 * into a value in the input domain for the dependent random number
+	 * distribution.
+	 */
+	_DInputType
+	operator()()
+	{
+	  return std::generate_canonical<_DInputType,
+	                            std::numeric_limits<_DInputType>::digits,
+	                            _Engine>(_M_g);
+	}
+
+      private:
+	_Engine& _M_g;
+      };
+
+  _GLIBCXX_END_NAMESPACE_VERSION
+  } // namespace __detail
+
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+  /**
+   * @addtogroup random_generators Random Number Generators
+   * @ingroup random
+   *
+   * These classes define objects which provide random or pseudorandom
+   * numbers, either from a discrete or a continuous interval.  The
+   * random number generator supplied as a part of this library are
+   * all uniform random number generators which provide a sequence of
+   * random number uniformly distributed over their range.
+   *
+   * A number generator is a function object with an operator() that
+   * takes zero arguments and returns a number.
+   *
+   * A compliant random number generator must satisfy the following
+   * requirements.  <table border=1 cellpadding=10 cellspacing=0>
+   * <caption align=top>Random Number Generator Requirements</caption>
+   * <tr><td>To be documented.</td></tr> </table>
+   *
+   * @{
+   */
+
+  /**
+   * @brief A model of a linear congruential random number generator.
+   *
+   * A random number generator that produces pseudorandom numbers via
+   * linear function:
+   * @f[
+   *     x_{i+1}\leftarrow(ax_{i} + c) \bmod m 
+   * @f]
+   *
+   * The template parameter @p _UIntType must be an unsigned integral type
+   * large enough to store values up to (__m-1). If the template parameter
+   * @p __m is 0, the modulus @p __m used is
+   * std::numeric_limits<_UIntType>::max() plus 1. Otherwise, the template
+   * parameters @p __a and @p __c must be less than @p __m.
+   *
+   * The size of the state is @f$1@f$.
+   */
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    class linear_congruential_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(__m == 0u || (__a < __m && __c < __m),
+		    "template argument substituting __m out of bounds");
+
+      // XXX FIXME:
+      // _Mod::__calc should handle correctly __m % __a >= __m / __a too.
+      static_assert(__m % __a < __m / __a,
+		    "sorry, not implemented yet: try a smaller 'a' constant");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      /** The multiplier. */
+      static constexpr result_type multiplier   = __a;
+      /** An increment. */
+      static constexpr result_type increment    = __c;
+      /** The modulus. */
+      static constexpr result_type modulus      = __m;
+      static constexpr result_type default_seed = 1u;
+
+      /**
+       * @brief Constructs a %linear_congruential_engine random number
+       *        generator engine with seed @p __s.  The default seed value
+       *        is 1.
+       *
+       * @param __s The initial seed value.
+       */
+      explicit
+      linear_congruential_engine(result_type __s = default_seed)
+      { seed(__s); }
+
+      /**
+       * @brief Constructs a %linear_congruential_engine random number
+       *        generator engine seeded from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, linear_congruential_engine>::value>
+	       ::type>
+        explicit
+        linear_congruential_engine(_Sseq& __q)
+        { seed(__q); }
+
+      /**
+       * @brief Reseeds the %linear_congruential_engine random number generator
+       *        engine sequence to the seed @p __s.
+       *
+       * @param __s The new seed.
+       */
+      void
+      seed(result_type __s = default_seed);
+
+      /**
+       * @brief Reseeds the %linear_congruential_engine random number generator
+       *        engine
+       * sequence using values from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq>
+        typename std::enable_if<std::is_class<_Sseq>::value>::type
+        seed(_Sseq& __q);
+
+      /**
+       * @brief Gets the smallest possible value in the output range.
+       *
+       * The minimum depends on the @p __c parameter: if it is zero, the
+       * minimum generated must be > 0, otherwise 0 is allowed.
+       */
+      static constexpr result_type
+      min()
+      { return __c == 0u ? 1u : 0u; }
+
+      /**
+       * @brief Gets the largest possible value in the output range.
+       */
+      static constexpr result_type
+      max()
+      { return __m - 1u; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next random number in the sequence.
+       */
+      result_type
+      operator()()
+      {
+	_M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x);
+	return _M_x;
+      }
+
+      /**
+       * @brief Compares two linear congruential random number generator
+       * objects of the same type for equality.
+       *
+       * @param __lhs A linear congruential random number generator object.
+       * @param __rhs Another linear congruential random number generator
+       *              object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const linear_congruential_engine& __lhs,
+		 const linear_congruential_engine& __rhs)
+      { return __lhs._M_x == __rhs._M_x; }
+
+      /**
+       * @brief Writes the textual representation of the state x(i) of x to
+       *        @p __os.
+       *
+       * @param __os  The output stream.
+       * @param __lcr A % linear_congruential_engine random number generator.
+       * @returns __os.
+       */
+      template<typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
+	       _UIntType1 __m1, typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+		   const std::linear_congruential_engine<_UIntType1,
+		   __a1, __c1, __m1>& __lcr);
+
+      /**
+       * @brief Sets the state of the engine by reading its textual
+       *        representation from @p __is.
+       *
+       * The textual representation must have been previously written using
+       * an output stream whose imbued locale and whose type's template
+       * specialization arguments _CharT and _Traits were the same as those
+       * of @p __is.
+       *
+       * @param __is  The input stream.
+       * @param __lcr A % linear_congruential_engine random number generator.
+       * @returns __is.
+       */
+      template<typename _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
+	       _UIntType1 __m1, typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>& __is,
+		   std::linear_congruential_engine<_UIntType1, __a1,
+		   __c1, __m1>& __lcr);
+
+    private:
+      _UIntType _M_x;
+    };
+
+  /**
+   * @brief Compares two linear congruential random number generator
+   * objects of the same type for inequality.
+   *
+   * @param __lhs A linear congruential random number generator object.
+   * @param __rhs Another linear congruential random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    inline bool
+    operator!=(const std::linear_congruential_engine<_UIntType, __a,
+	       __c, __m>& __lhs,
+	       const std::linear_congruential_engine<_UIntType, __a,
+	       __c, __m>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * A generalized feedback shift register discrete random number generator.
+   *
+   * This algorithm avoids multiplication and division and is designed to be
+   * friendly to a pipelined architecture.  If the parameters are chosen
+   * correctly, this generator will produce numbers with a very long period and
+   * fairly good apparent entropy, although still not cryptographically strong.
+   *
+   * The best way to use this generator is with the predefined mt19937 class.
+   *
+   * This algorithm was originally invented by Makoto Matsumoto and
+   * Takuji Nishimura.
+   *
+   * @tparam __w  Word size, the number of bits in each element of 
+   *              the state vector.
+   * @tparam __n  The degree of recursion.
+   * @tparam __m  The period parameter.
+   * @tparam __r  The separation point bit index.
+   * @tparam __a  The last row of the twist matrix.
+   * @tparam __u  The first right-shift tempering matrix parameter.
+   * @tparam __d  The first right-shift tempering matrix mask.
+   * @tparam __s  The first left-shift tempering matrix parameter.
+   * @tparam __b  The first left-shift tempering matrix mask.
+   * @tparam __t  The second left-shift tempering matrix parameter.
+   * @tparam __c  The second left-shift tempering matrix mask.
+   * @tparam __l  The second right-shift tempering matrix parameter.
+   * @tparam __f  Initialization multiplier.
+   */
+  template<typename _UIntType, size_t __w,
+	   size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t,
+	   _UIntType __c, size_t __l, _UIntType __f>
+    class mersenne_twister_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(1u <= __m && __m <= __n,
+		    "template argument substituting __m out of bounds");
+      static_assert(__r <= __w, "template argument substituting "
+		    "__r out of bound");
+      static_assert(__u <= __w, "template argument substituting "
+		    "__u out of bound");
+      static_assert(__s <= __w, "template argument substituting "
+		    "__s out of bound");
+      static_assert(__t <= __w, "template argument substituting "
+		    "__t out of bound");
+      static_assert(__l <= __w, "template argument substituting "
+		    "__l out of bound");
+      static_assert(__w <= std::numeric_limits<_UIntType>::digits,
+		    "template argument substituting __w out of bound");
+      static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __a out of bound");
+      static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __b out of bound");
+      static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __c out of bound");
+      static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __d out of bound");
+      static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1),
+		    "template argument substituting __f out of bound");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      // parameter values
+      static constexpr size_t      word_size                 = __w;
+      static constexpr size_t      state_size                = __n;
+      static constexpr size_t      shift_size                = __m;
+      static constexpr size_t      mask_bits                 = __r;
+      static constexpr result_type xor_mask                  = __a;
+      static constexpr size_t      tempering_u               = __u;
+      static constexpr result_type tempering_d               = __d;
+      static constexpr size_t      tempering_s               = __s;
+      static constexpr result_type tempering_b               = __b;
+      static constexpr size_t      tempering_t               = __t;
+      static constexpr result_type tempering_c               = __c;
+      static constexpr size_t      tempering_l               = __l;
+      static constexpr result_type initialization_multiplier = __f;
+      static constexpr result_type default_seed = 5489u;
+
+      // constructors and member function
+      explicit
+      mersenne_twister_engine(result_type __sd = default_seed)
+      { seed(__sd); }
+
+      /**
+       * @brief Constructs a %mersenne_twister_engine random number generator
+       *        engine seeded from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+        std::enable_if<!std::is_same<_Sseq, mersenne_twister_engine>::value>
+	       ::type>
+        explicit
+        mersenne_twister_engine(_Sseq& __q)
+        { seed(__q); }
+
+      void
+      seed(result_type __sd = default_seed);
+
+      template<typename _Sseq>
+	typename std::enable_if<std::is_class<_Sseq>::value>::type
+        seed(_Sseq& __q);
+
+      /**
+       * @brief Gets the smallest possible value in the output range.
+       */
+      static constexpr result_type
+      min()
+      { return 0; };
+
+      /**
+       * @brief Gets the largest possible value in the output range.
+       */
+      static constexpr result_type
+      max()
+      { return __detail::_Shift<_UIntType, __w>::__value - 1; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two % mersenne_twister_engine random number generator
+       *        objects of the same type for equality.
+       *
+       * @param __lhs A % mersenne_twister_engine random number generator
+       *              object.
+       * @param __rhs Another % mersenne_twister_engine random number
+       *              generator object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const mersenne_twister_engine& __lhs,
+		 const mersenne_twister_engine& __rhs)
+      { return (std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x)
+		&& __lhs._M_p == __rhs._M_p); }
+
+      /**
+       * @brief Inserts the current state of a % mersenne_twister_engine
+       *        random number generator engine @p __x into the output stream
+       *        @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A % mersenne_twister_engine random number generator
+       *             engine.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _UIntType1,
+	       size_t __w1, size_t __n1,
+	       size_t __m1, size_t __r1,
+	       _UIntType1 __a1, size_t __u1,
+	       _UIntType1 __d1, size_t __s1,
+	       _UIntType1 __b1, size_t __t1,
+	       _UIntType1 __c1, size_t __l1, _UIntType1 __f1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+		   const std::mersenne_twister_engine<_UIntType1, __w1, __n1,
+		   __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
+		   __l1, __f1>& __x);
+
+      /**
+       * @brief Extracts the current state of a % mersenne_twister_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A % mersenne_twister_engine random number generator
+       *             engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       * an error state.
+       */
+      template<typename _UIntType1,
+	       size_t __w1, size_t __n1,
+	       size_t __m1, size_t __r1,
+	       _UIntType1 __a1, size_t __u1,
+	       _UIntType1 __d1, size_t __s1,
+	       _UIntType1 __b1, size_t __t1,
+	       _UIntType1 __c1, size_t __l1, _UIntType1 __f1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>& __is,
+		   std::mersenne_twister_engine<_UIntType1, __w1, __n1, __m1,
+		   __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1,
+		   __l1, __f1>& __x);
+
+    private:
+      _UIntType _M_x[state_size];
+      size_t    _M_p;
+    };
+
+  /**
+   * @brief Compares two % mersenne_twister_engine random number generator
+   *        objects of the same type for inequality.
+   *
+   * @param __lhs A % mersenne_twister_engine random number generator
+   *              object.
+   * @param __rhs Another % mersenne_twister_engine random number
+   *              generator object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, size_t __w,
+	   size_t __n, size_t __m, size_t __r,
+	   _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+	   _UIntType __b, size_t __t,
+	   _UIntType __c, size_t __l, _UIntType __f>
+    inline bool
+    operator!=(const std::mersenne_twister_engine<_UIntType, __w, __n, __m,
+	       __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs,
+	       const std::mersenne_twister_engine<_UIntType, __w, __n, __m,
+	       __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * @brief The Marsaglia-Zaman generator.
+   *
+   * This is a model of a Generalized Fibonacci discrete random number
+   * generator, sometimes referred to as the SWC generator.
+   *
+   * A discrete random number generator that produces pseudorandom
+   * numbers using:
+   * @f[
+   *     x_{i}\leftarrow(x_{i - s} - x_{i - r} - carry_{i-1}) \bmod m 
+   * @f]
+   *
+   * The size of the state is @f$r@f$
+   * and the maximum period of the generator is @f$(m^r - m^s - 1)@f$.
+   *
+   * @var _M_x     The state of the generator.  This is a ring buffer.
+   * @var _M_carry The carry.
+   * @var _M_p     Current index of x(i - r).
+   */
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    class subtract_with_carry_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(0u < __s && __s < __r,
+		    "template argument substituting __s out of bounds");
+      static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits,
+		    "template argument substituting __w out of bounds");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      // parameter values
+      static constexpr size_t      word_size    = __w;
+      static constexpr size_t      short_lag    = __s;
+      static constexpr size_t      long_lag     = __r;
+      static constexpr result_type default_seed = 19780503u;
+
+      /**
+       * @brief Constructs an explicitly seeded % subtract_with_carry_engine
+       *        random number generator.
+       */
+      explicit
+      subtract_with_carry_engine(result_type __sd = default_seed)
+      { seed(__sd); }
+
+      /**
+       * @brief Constructs a %subtract_with_carry_engine random number engine
+       *        seeded from the seed sequence @p __q.
+       *
+       * @param __q the seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+        std::enable_if<!std::is_same<_Sseq, subtract_with_carry_engine>::value>
+	       ::type>
+        explicit
+        subtract_with_carry_engine(_Sseq& __q)
+        { seed(__q); }
+
+      /**
+       * @brief Seeds the initial state @f$x_0@f$ of the random number
+       *        generator.
+       *
+       * N1688[4.19] modifies this as follows.  If @p __value == 0,
+       * sets value to 19780503.  In any case, with a linear
+       * congruential generator lcg(i) having parameters @f$ m_{lcg} =
+       * 2147483563, a_{lcg} = 40014, c_{lcg} = 0, and lcg(0) = value
+       * @f$, sets @f$ x_{-r} \dots x_{-1} @f$ to @f$ lcg(1) \bmod m
+       * \dots lcg(r) \bmod m @f$ respectively.  If @f$ x_{-1} = 0 @f$
+       * set carry to 1, otherwise sets carry to 0.
+       */
+      void
+      seed(result_type __sd = default_seed);
+
+      /**
+       * @brief Seeds the initial state @f$x_0@f$ of the
+       * % subtract_with_carry_engine random number generator.
+       */
+      template<typename _Sseq>
+	typename std::enable_if<std::is_class<_Sseq>::value>::type
+        seed(_Sseq& __q);
+
+      /**
+       * @brief Gets the inclusive minimum value of the range of random
+       * integers returned by this generator.
+       */
+      static constexpr result_type
+      min()
+      { return 0; }
+
+      /**
+       * @brief Gets the inclusive maximum value of the range of random
+       * integers returned by this generator.
+       */
+      static constexpr result_type
+      max()
+      { return __detail::_Shift<_UIntType, __w>::__value - 1; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next random number in the sequence.
+       */
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two % subtract_with_carry_engine random number
+       *        generator objects of the same type for equality.
+       *
+       * @param __lhs A % subtract_with_carry_engine random number generator
+       *              object.
+       * @param __rhs Another % subtract_with_carry_engine random number
+       *              generator object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+      */
+      friend bool
+      operator==(const subtract_with_carry_engine& __lhs,
+		 const subtract_with_carry_engine& __rhs)
+      { return (std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x)
+		&& __lhs._M_carry == __rhs._M_carry
+		&& __lhs._M_p == __rhs._M_p); }
+
+      /**
+       * @brief Inserts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x into the output stream
+       *        @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A % subtract_with_carry_engine random number generator
+       *             engine.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>&,
+		   const std::subtract_with_carry_engine<_UIntType1, __w1,
+		   __s1, __r1>&);
+
+      /**
+       * @brief Extracts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A % subtract_with_carry_engine random number generator
+       *             engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       * an error state.
+       */
+      template<typename _UIntType1, size_t __w1, size_t __s1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>&,
+		   std::subtract_with_carry_engine<_UIntType1, __w1,
+		   __s1, __r1>&);
+
+    private:
+      _UIntType  _M_x[long_lag];
+      _UIntType  _M_carry;
+      size_t     _M_p;
+    };
+
+  /**
+   * @brief Compares two % subtract_with_carry_engine random number
+   *        generator objects of the same type for inequality.
+   *
+   * @param __lhs A % subtract_with_carry_engine random number generator
+   *              object.
+   * @param __rhs Another % subtract_with_carry_engine random number
+   *              generator object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    inline bool
+    operator!=(const std::subtract_with_carry_engine<_UIntType, __w,
+	       __s, __r>& __lhs,
+	       const std::subtract_with_carry_engine<_UIntType, __w,
+	       __s, __r>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * Produces random numbers from some base engine by discarding blocks of
+   * data.
+   *
+   * 0 <= @p __r <= @p __p
+   */
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    class discard_block_engine
+    {
+      static_assert(1 <= __r && __r <= __p,
+		    "template argument substituting __r out of bounds");
+
+    public:
+      /** The type of the generated random value. */
+      typedef typename _RandomNumberEngine::result_type result_type;
+
+      // parameter values
+      static constexpr size_t block_size = __p;
+      static constexpr size_t used_block = __r;
+
+      /**
+       * @brief Constructs a default %discard_block_engine engine.
+       *
+       * The underlying engine is default constructed as well.
+       */
+      discard_block_engine()
+      : _M_b(), _M_n(0) { }
+
+      /**
+       * @brief Copy constructs a %discard_block_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param __rng An existing (base class) engine object.
+       */
+      explicit
+      discard_block_engine(const _RandomNumberEngine& __rng)
+      : _M_b(__rng), _M_n(0) { }
+
+      /**
+       * @brief Move constructs a %discard_block_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param __rng An existing (base class) engine object.
+       */
+      explicit
+      discard_block_engine(_RandomNumberEngine&& __rng)
+      : _M_b(std::move(__rng)), _M_n(0) { }
+
+      /**
+       * @brief Seed constructs a %discard_block_engine engine.
+       *
+       * Constructs the underlying generator engine seeded with @p __s.
+       * @param __s A seed value for the base class engine.
+       */
+      explicit
+      discard_block_engine(result_type __s)
+      : _M_b(__s), _M_n(0) { }
+
+      /**
+       * @brief Generator construct a %discard_block_engine engine.
+       *
+       * @param __q A seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, discard_block_engine>::value
+		       && !std::is_same<_Sseq, _RandomNumberEngine>::value>
+	       ::type>
+        explicit
+        discard_block_engine(_Sseq& __q)
+	: _M_b(__q), _M_n(0)
+        { }
+
+      /**
+       * @brief Reseeds the %discard_block_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed()
+      {
+	_M_b.seed();
+	_M_n = 0;
+      }
+
+      /**
+       * @brief Reseeds the %discard_block_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed(result_type __s)
+      {
+	_M_b.seed(__s);
+	_M_n = 0;
+      }
+
+      /**
+       * @brief Reseeds the %discard_block_engine object with the given seed
+       *        sequence.
+       * @param __q A seed generator function.
+       */
+      template<typename _Sseq>
+        void
+        seed(_Sseq& __q)
+        {
+	  _M_b.seed(__q);
+	  _M_n = 0;
+	}
+
+      /**
+       * @brief Gets a const reference to the underlying generator engine
+       *        object.
+       */
+      const _RandomNumberEngine&
+      base() const noexcept
+      { return _M_b; }
+
+      /**
+       * @brief Gets the minimum value in the generated random number range.
+       */
+      static constexpr result_type
+      min()
+      { return _RandomNumberEngine::min(); }
+
+      /**
+       * @brief Gets the maximum value in the generated random number range.
+       */
+      static constexpr result_type
+      max()
+      { return _RandomNumberEngine::max(); }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next value in the generated random number sequence.
+       */
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two %discard_block_engine random number generator
+       *        objects of the same type for equality.
+       *
+       * @param __lhs A %discard_block_engine random number generator object.
+       * @param __rhs Another %discard_block_engine random number generator
+       *              object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const discard_block_engine& __lhs,
+		 const discard_block_engine& __rhs)
+      { return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; }
+
+      /**
+       * @brief Inserts the current state of a %discard_block_engine random
+       *        number generator engine @p __x into the output stream
+       *        @p __os.
+       *
+       * @param __os An output stream.
+       * @param __x  A %discard_block_engine random number generator engine.
+       *
+       * @returns The output stream with the state of @p __x inserted or in
+       * an error state.
+       */
+      template<typename _RandomNumberEngine1, size_t __p1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_ostream<_CharT, _Traits>&
+	operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+		   const std::discard_block_engine<_RandomNumberEngine1,
+		   __p1, __r1>& __x);
+
+      /**
+       * @brief Extracts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %discard_block_engine random number generator engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       * an error state.
+       */
+      template<typename _RandomNumberEngine1, size_t __p1, size_t __r1,
+	       typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>& __is,
+		   std::discard_block_engine<_RandomNumberEngine1,
+		   __p1, __r1>& __x);
+
+    private:
+      _RandomNumberEngine _M_b;
+      size_t _M_n;
+    };
+
+  /**
+   * @brief Compares two %discard_block_engine random number generator
+   *        objects of the same type for inequality.
+   *
+   * @param __lhs A %discard_block_engine random number generator object.
+   * @param __rhs Another %discard_block_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    inline bool
+    operator!=(const std::discard_block_engine<_RandomNumberEngine, __p,
+	       __r>& __lhs,
+	       const std::discard_block_engine<_RandomNumberEngine, __p,
+	       __r>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
+  /**
+   * Produces random numbers by combining random numbers from some base
+   * engine to produce random numbers with a specifies number of bits @p __w.
+   */
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType>
+    class independent_bits_engine
+    {
+      static_assert(std::is_unsigned<_UIntType>::value, "template argument "
+		    "substituting _UIntType not an unsigned integral type");
+      static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits,
+		    "template argument substituting __w out of bounds");
+
+    public:
+      /** The type of the generated random value. */
+      typedef _UIntType result_type;
+
+      /**
+       * @brief Constructs a default %independent_bits_engine engine.
+       *
+       * The underlying engine is default constructed as well.
+       */
+      independent_bits_engine()
+      : _M_b() { }
+
+      /**
+       * @brief Copy constructs a %independent_bits_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param __rng An existing (base class) engine object.
+       */
+      explicit
+      independent_bits_engine(const _RandomNumberEngine& __rng)
+      : _M_b(__rng) { }
+
+      /**
+       * @brief Move constructs a %independent_bits_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param __rng An existing (base class) engine object.
+       */
+      explicit
+      independent_bits_engine(_RandomNumberEngine&& __rng)
+      : _M_b(std::move(__rng)) { }
+
+      /**
+       * @brief Seed constructs a %independent_bits_engine engine.
+       *
+       * Constructs the underlying generator engine seeded with @p __s.
+       * @param __s A seed value for the base class engine.
+       */
+      explicit
+      independent_bits_engine(result_type __s)
+      : _M_b(__s) { }
+
+      /**
+       * @brief Generator construct a %independent_bits_engine engine.
+       *
+       * @param __q A seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, independent_bits_engine>::value
+		       && !std::is_same<_Sseq, _RandomNumberEngine>::value>
+               ::type>
+        explicit
+        independent_bits_engine(_Sseq& __q)
+        : _M_b(__q)
+        { }
+
+      /**
+       * @brief Reseeds the %independent_bits_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed()
+      { _M_b.seed(); }
+
+      /**
+       * @brief Reseeds the %independent_bits_engine object with the default
+       *        seed for the underlying base class generator engine.
+       */
+      void
+      seed(result_type __s)
+      { _M_b.seed(__s); }
+
+      /**
+       * @brief Reseeds the %independent_bits_engine object with the given
+       *        seed sequence.
+       * @param __q A seed generator function.
+       */
+      template<typename _Sseq>
+        void
+        seed(_Sseq& __q)
+        { _M_b.seed(__q); }
+
+      /**
+       * @brief Gets a const reference to the underlying generator engine
+       *        object.
+       */
+      const _RandomNumberEngine&
+      base() const noexcept
+      { return _M_b; }
+
+      /**
+       * @brief Gets the minimum value in the generated random number range.
+       */
+      static constexpr result_type
+      min()
+      { return 0U; }
+
+      /**
+       * @brief Gets the maximum value in the generated random number range.
+       */
+      static constexpr result_type
+      max()
+      { return __detail::_Shift<_UIntType, __w>::__value - 1; }
+
+      /**
+       * @brief Discard a sequence of random numbers.
+       */
+      void
+      discard(unsigned long long __z)
+      {
+	for (; __z != 0ULL; --__z)
+	  (*this)();
+      }
+
+      /**
+       * @brief Gets the next value in the generated random number sequence.
+       */
+      result_type
+      operator()();
+
+      /**
+       * @brief Compares two %independent_bits_engine random number generator
+       * objects of the same type for equality.
+       *
+       * @param __lhs A %independent_bits_engine random number generator
+       *              object.
+       * @param __rhs Another %independent_bits_engine random number generator
+       *              object.
+       *
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+       */
+      friend bool
+      operator==(const independent_bits_engine& __lhs,
+		 const independent_bits_engine& __rhs)
+      { return __lhs._M_b == __rhs._M_b; }
+
+      /**
+       * @brief Extracts the current state of a % subtract_with_carry_engine
+       *        random number generator engine @p __x from the input stream
+       *        @p __is.
+       *
+       * @param __is An input stream.
+       * @param __x  A %independent_bits_engine random number generator
+       *             engine.
+       *
+       * @returns The input stream with the state of @p __x extracted or in
+       *          an error state.
+       */
+      template<typename _CharT, typename _Traits>
+	friend std::basic_istream<_CharT, _Traits>&
+	operator>>(std::basic_istream<_CharT, _Traits>& __is,
+		   std::independent_bits_engine<_RandomNumberEngine,
+		   __w, _UIntType>& __x)
+	{
+	  __is >> __x._M_b;
+	  return __is;
+	}
+
+    private:
+      _RandomNumberEngine _M_b;
+    };
+
+  /**
+   * @brief Compares two %independent_bits_engine random number generator
+   * objects of the same type for inequality.
+   *
+   * @param __lhs A %independent_bits_engine random number generator
+   *              object.
+   * @param __rhs Another %independent_bits_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType>
+    inline bool
+    operator!=(const std::independent_bits_engine<_RandomNumberEngine, __w,
+	       _UIntType>& __lhs,
+	       const std::independent_bits_engine<_RandomNumberEngine, __w,
+	       _UIntType>& __rhs)
+    { return !(__lhs == __rhs); }
+
+  /**
+   * @brief Inserts the current state of a %independent_bits_engine random
+   *        number generator engine @p __x into the output stream @p __os.
+   *
+   * @param __os An output stream.
+   * @param __x  A %independent_bits_engine random number generator engine.
+   *
+   * @returns The output stream with the state of @p __x inserted or in
+   *          an error state.
+   */
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType,
+	   typename _CharT, typename _Traits>
+    std::basic_ostream<_CharT, _Traits>&
+    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+	       const std::independent_bits_engine<_RandomNumberEngine,
+	       __w, _UIntType>& __x)
+    {
+      __os << __x.base();
+      return __os;
+    }
+
+
+  /**
+   * @brief Produces random numbers by combining random numbers from some
+   * base engine to produce random numbers with a specifies number of bits
+   * @p __w.
+   */
+  template<typename _RandomNumberEngine, size_t __k>
+    class shuffle_order_engine
+    {
+      static_assert(1u <= __k, "template argument substituting "
+		    "__k out of bound");
+
+    public:
+      /** The type of the generated random value. */
+      typedef typename _RandomNumberEngine::result_type result_type;
+
+      static constexpr size_t table_size = __k;
+
+      /**
+       * @brief Constructs a default %shuffle_order_engine engine.
+       *
+       * The underlying engine is default constructed as well.
+       */
+      shuffle_order_engine()
+      : _M_b()
+      { _M_initialize(); }
+
+      /**
+       * @brief Copy constructs a %shuffle_order_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param __rng An existing (base class) engine object.
+       */
+      explicit
+      shuffle_order_engine(const _RandomNumberEngine& __rng)
+      : _M_b(__rng)
+      { _M_initialize(); }
+
+      /**
+       * @brief Move constructs a %shuffle_order_engine engine.
+       *
+       * Copies an existing base class random number generator.
+       * @param __rng An existing (base class) engine object.
+       */
+      explicit
+      shuffle_order_engine(_RandomNumberEngine&& __rng)
+      : _M_b(std::move(__rng))
+      { _M_initialize(); }
+
+      /**
+       * @brief Seed constructs a %shuffle_order_engine engine.
+       *
+       * Constructs the underlying generator engine seeded with @p __s.
+       * @param __s A seed value for the base class engine.
+       */
+      explicit
+      shuffle_order_engine(result_type __s)
+      : _M_b(__s)
+      { _M_initialize(); }
+
+      /**
+       * @brief Generator construct a %shuffle_order_engine engine.
+       *
+       * @param __q A seed sequence.
+       */
+      template<typename _Sseq, typename = typename
+	std::enable_if<!std::is_same<_Sseq, shuffle_order_engine>::value
+		       && !std::is_same<_Sseq, _RandomNumberEngine>::value>
+	       ::type>
+        explicit
+        shuffle_order_engine(_Sseq& __q)
+        : _M_b(__q)
+        { _M_initialize(); }
+
+      /**
+       * @brief Reseeds the %shuffle_order_engine object with the default seed
+                for the underlying base class generator engine.
+       */
+      void
+      seed()
+      {
+	_M_b.seed();
+	_M_initialize();