NCBI C++ ToolKit
compile_time_bits.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef __COMPILE_TIME_BITS_HPP_INCLUDED__
2 #define __COMPILE_TIME_BITS_HPP_INCLUDED__
3 
4 /* $Id: compile_time_bits.hpp 100117 2023-06-20 13:23:40Z gouriano $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Sergiy Gotvyanskyy
30  *
31  * File Description:
32  *
33  * various compile time structures and functions
34  *
35  *
36  */
37 
38 #include <type_traits>
39 #include <cstdint>
40 #include <limits>
41 #include <stdexcept>
42 #include <array>
43 
44 // forward declarations to avoid unnecessary includes
45 namespace ncbi
46 {
47  class CTempString;
48  class CTempStringEx;
49 }
50 
51 namespace std
52 { // backported C++20,23 defs
53 
54 #ifndef __cpp_lib_remove_cvref
55  template< class T >
56  struct remove_cvref {
57  typedef std::remove_cv_t<std::remove_reference_t<T>> type;
58  };
59  template< class T >
61 #endif
62 
63 // backported C++23
64 #ifndef __cpp_lib_to_underlying
65  template< class Enum >
66  constexpr std::underlying_type_t<Enum> to_underlying( Enum e ) noexcept
67  {
68  return static_cast<std::underlying_type_t<Enum>>(e);
69  }
70 #endif
71 
72 }
73 
74 // on some compilers tuple are undeveloped for constexpr
75 #if defined(NCBI_COMPILER_ICC) || (defined(NCBI_COMPILER_MSVC) && NCBI_COMPILER_VERSION<=1916)
76 # define ct_const_tuple compile_time_bits::const_tuple
77 # include "const_tuple.hpp"
78 #else
79 # define ct_const_tuple std::tuple
80 # define const_tuple std::tuple
81 #endif
82 
83 #define ct_const_array std::array
84 #define const_array std::array
85 
86 #include "ct_string_cxx17.hpp"
87 
88 
89 #ifndef __cpp_lib_hardware_interference_size
90 namespace std
91 {// these are backported implementations of C++17 methods
94 }
95 #endif
96 
98 {
99  template <typename T>
100  struct array_size {};
101 
102  template <typename T>
104 
105  template <typename T, std::size_t N>
106  struct array_size<const_array<T, N>>: std::integral_constant<size_t, N> {};
107 
108  template <typename T, std::size_t N>
109  struct array_size<T[N]>: std::integral_constant<size_t, N> {};
110 
111  template<typename T>
112  constexpr size_t get_array_size(T&&)
113  {
114  return array_size<T>::value;
115  }
116 
117  template<typename T>
118  struct array_elem{};
119 
120  template<typename T>
122 
123  template<typename T>
125 
126  template<typename T, size_t N>
127  struct array_elem<T[N]>
128  {
129  using type = T;
130  };
131  template<typename T, size_t N>
133  {
134  using type = T;
135  };
136  template<typename T>
138 
139  template <typename T,
140  size_t N = array_size<T>::value,
141  typename _Elem = array_elem_t<T>,
142  std::size_t... I>
143  constexpr auto to_array_impl(T&& a, std::index_sequence<I...>)
145  {
146  return {a[I]...};
147  }
148 
150  constexpr auto make_array(T&& a)
151  {
152  return to_array_impl(std::forward<T>(a), std::make_index_sequence<N>{});
153  }
154  template <typename T, size_t N>
155  constexpr auto make_array(T const (&a)[N])
156  {
157  return to_array_impl(a, std::make_index_sequence<N>{});
158  }
159 
160  template <
161  typename...TArgs,
162  size_t N=sizeof...(TArgs),
163  typename _Tuple=typename std::enable_if<(N>1),
164  std::tuple<TArgs...>>::type,
165  typename T = std::tuple_element_t<0, _Tuple>
166  >
167  constexpr auto make_array(TArgs&&...args)
168  {
169  T _array[] = { std::forward<TArgs>(args)... };
170  return make_array(_array);
171  }
172 
173 }
174 
175 namespace compile_time_bits
176 {
177  template<typename T, typename _Unused=T>
179  {
180  using type = T;
181  };
182 
183  template<typename T>
184  struct real_underlying_type<T, std::enable_if_t<std::is_enum<T>::value, T>>
185  {
186  using type = std::underlying_type_t<T>;
187  };
188  template<typename T>
190 
191  template< class Enum>
193  {
194  return static_cast<real_underlying_type_t<Enum>>(e);
195  }
196 
197 
198  // write your own DeduceType specialization if required
199  template<typename _BaseType, typename _BackType=_BaseType>
200  struct DeduceType
201  {
202  using value_type = _BaseType;
203  using init_type = _BackType;
204  using hash_type = void; //this is basic type, it doesn't have any comparison rules
205  };
206 
207  template<typename _BaseType>
208  struct DeduceType<_BaseType, std::enable_if_t<
209  std::is_enum<_BaseType>::value ||
210  std::numeric_limits<_BaseType>::is_integer,
211  _BaseType>>
212  {
213  using value_type = _BaseType;
214  using init_type = _BaseType;
215  using hash_type = _BaseType;
216  //using hash_type = real_underlying_type_t<_BaseType>;
217  using hash_compare = std::less<hash_type>;
218  using value_compare = std::less<value_type>;
219  };
220 
221  template<class _CharType, typename tag=tagStrCase>
222  struct StringType
223  {
225  using case_tag = tag;
226 
227  using value_type = view;
228  using init_type = view;
229  using hash_type = view;
230 
231  using hash_compare = std::less<tag>;
232  using value_compare = std::less<tag>;
233  };
234 
235  template<typename, typename = void>
236  struct is_string_type : std::false_type {};
237 
238  template<typename _T>
239  struct is_string_type<_T, std::void_t<typename _T::case_tag>> : std::true_type {};
240 
241 
242  template<>
243  struct DeduceType<tagStrCase>: StringType<char, tagStrCase> {};
244 
245  template<>
246  struct DeduceType<tagStrNocase>: StringType<char, tagStrNocase> {};
247 
248 
249  template<class _CharType>
250  struct DeduceType<
251  _CharType*,
252  std::enable_if_t<
257  _CharType*>
258  > : StringType<_CharType> {};
259 
260  template<typename T>
262 
263  template<class T>
264  struct DeduceType<
265  T,
266  std::enable_if_t<
267  std::is_same<T, ncbi::CTempString>::value ||
268  std::is_same<T, ncbi::CTempStringEx>::value,
269  T>
270  > : StringType<char>
271  {};
272 
273  template<class _CharType>
274  struct DeduceType<ct_basic_string<_CharType>> : StringType<_CharType> {};
275 
276  template<class _CharType, class Traits, class Allocator>
277  struct DeduceType<std::basic_string<_CharType, Traits, Allocator>>
278  : StringType<_CharType>
279  {};
280 
281  template<class _CharType, class Traits>
282  struct DeduceType<std::basic_string_view<_CharType, Traits>>
283  : StringType<_CharType>
284  {};
285 
286  template<typename..._Types>
287  struct DeduceType<std::pair<_Types...>>
288  {
290  using init_type = std::pair<typename DeduceType<_Types>::init_type...>;
291  using hash_type = void;
292  };
293 
294  template<typename..._Types>
295  struct DeduceType<std::tuple<_Types...>>
296  {
299  using hash_type = void;
300  };
301 
302  // there is nothing to deduce if type has init_type and value_type members
303  template<class _Self>
304  struct DeduceType<_Self,
305  std::enable_if_t<
306  std::is_copy_constructible<typename _Self::init_type>::value &&
307  std::is_copy_constructible<typename _Self::value_type>::value,
308  _Self>> : _Self {};
309 
310 
311  template<typename T>
313 
314 }
315 
316 namespace compile_time_bits
317 {
318  // non-containing constexpr vector
319  template<typename _Type>
321  {
322  public:
323  using value_type = _Type;
324  using size_type = std::size_t;
325  using difference_type = std::ptrdiff_t;
326  using reference = const value_type&;
327  using const_reference = const value_type&;
328  using pointer = const value_type*;
329  using const_pointer = const value_type*;
330  using iterator = pointer;
332  using reverse_iterator = std::reverse_iterator<iterator>;
333  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
334 
335  constexpr const_vector() = default;
336  constexpr const_vector(const_pointer data, size_t size )
337  : m_size{size}, m_data{data} {}
338 
339  constexpr const_vector(std::nullptr_t) {}
340 
341  template<size_t N>
342  constexpr const_vector(const std::array<value_type, N>& data )
343  : m_size{data.size()}, m_data{data.data()} {}
344 
345  template<size_t N>
346  constexpr const_vector(value_type const (&init)[N]) : m_size{N}, m_data{init} {}
347 
348  constexpr const_reference operator[](size_t index) const { return m_data[index]; }
349  constexpr const_reference at(size_t index) const { return m_data[index]; }
350  constexpr const_pointer data() const noexcept { return m_data; }
351 
352  constexpr const_reference front() const { return m_data[0]; }
353  constexpr const_reference back() const { return m_data[m_size-1]; }
354 
355  constexpr size_type size() const noexcept { return m_size; }
356  constexpr size_type max_size() const noexcept { return size(); }
357  constexpr size_type capacity() const noexcept { return size(); }
358  [[nodiscard]] constexpr bool empty() const noexcept { return size() == 0; }
359 
360  constexpr const_iterator begin() const noexcept { return m_data; }
361  constexpr const_iterator cbegin() const noexcept { return begin(); }
362  constexpr const_iterator end() const noexcept { return begin() + size(); }
363  constexpr const_iterator cend() const noexcept { return end(); }
364  constexpr const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator{ end() }; }
365  constexpr const_reverse_iterator rcbegin() const noexcept { return rbegin(); }
366  constexpr const_reverse_iterator rend() const noexcept { return const_reverse_iterator{ begin() }; }
367  constexpr const_reverse_iterator rcend() const noexcept { return rend(); }
368 
369  protected:
370  size_t m_size = 0;
372  };
373 }
374 
375 namespace compile_time_bits
376 {
377  using tag_DuplicatesYes = std::true_type;
378  using tag_DuplicatesNo = std::false_type;
379 
380  using tag_SortByHashes = std::true_type;
381  using tag_SortByValues = std::false_type;
382 
383  template<typename _Traits, typename _AllowDuplicates>
384  class TInsertSorter;
385 
386  template<typename _Ty>
388  {
390 
396 
397  static constexpr hash_type get_init_hash(const init_type& v)
398  {
399  return v;
400  }
401  static constexpr const key_type& get_key(const value_type& v)
402  {
403  return v;
404  }
405  static constexpr value_type construct(const init_type& v)
406  {
407  return v;
408  }
409  };
410 
411  template<typename _T1, typename _T2>
413  {
418 
420  using hash_type = typename HT1::hash_type;
421  using init_type = typename pair_type::init_type;
422  using init_key_type = typename HT1::init_type;
423  using key_type = typename HT1::value_type;
424 
425  static constexpr hash_type get_init_hash(const init_type& v)
426  {
427  return v.first;
428  }
429  static constexpr const key_type& get_key(const value_type& v)
430  {
431  return v.first;
432  }
433  static constexpr const key_type& get_key(const key_type& v)
434  {
435  return v;
436  }
437  static constexpr value_type construct(const init_type& v)
438  {
439  return value_type{ v.first, v.second };
440  }
441  };
442 
443  template<typename _T1, typename _T2>
445  {
451 
453  using hash_type = typename HT1::hash_type;
454  using init_key_type = typename HT1::init_type;
455  using key_type = typename HT1::value_type;
456 
457  static constexpr hash_type get_init_hash(const init_type& v)
458  {
459  return v.second;
460  }
461  static constexpr const key_type& get_key(const value_type& v)
462  {
463  return v.first;
464  }
465  static constexpr const key_type& get_key(const key_type& v)
466  {
467  return v;
468  }
469  static constexpr value_type construct(const init_type& v)
470  {
471  return value_type{ v.second, v.first };
472  }
473  };
474 
475  // This is 'contained' backend for binary search containers, it can be beared with it's owning class
476  template<typename _ProxyType>
478  {};
479 
480  template<typename _SizeType, typename _ArrayType>
481  class simple_backend<std::pair<_SizeType, _ArrayType>>
482  {
483  public:
484  constexpr simple_backend() = default;
485 
487 
488  constexpr simple_backend(const std::pair<_SizeType, _ArrayType>& init)
489  : m_array { std::get<1>(init) },
490  m_realsize { std::get<0>(init) }
491  {}
492 
493  static constexpr auto capacity = array_size<_ArrayType>::value;
494  constexpr auto realsize() const noexcept { return m_realsize; }
495  constexpr auto indexsize() const noexcept { return m_realsize; }
496  constexpr auto get_values() const noexcept { return m_array.data(); }
497  constexpr auto get_index() const noexcept { return m_array.data(); }
498  private:
499  _ArrayType m_array;
500  std::size_t m_realsize{0};
501  };
502 
503  template<typename _SizeType, typename _ArrayType, typename _IndexType>
504  class simple_backend<std::tuple<_SizeType, _ArrayType, _IndexType>>
505  {
506  public:
509  using tuple_type = std::tuple<_SizeType, _ArrayType, _IndexType>;
510 
511  static constexpr auto capacity = array_size<_ArrayType>::value;
512 
513  constexpr simple_backend() = default;
514 
515  constexpr simple_backend(const tuple_type& init)
516  : m_index { std::get<2>(init) },
517  m_array { std::get<1>(init) },
518  m_realsize { std::get<0>(init) }
519  {}
520 
521  constexpr auto realsize() const noexcept { return m_realsize; }
522  constexpr auto indexsize() const noexcept { return m_realsize; }
523  constexpr auto get_values() const noexcept { return m_array.data(); }
524  constexpr auto get_index() const noexcept { return m_index.data(); }
525  private:
526  _IndexType m_index{}; // index is first because it can be aligned
527  _ArrayType m_array{};
528  _SizeType m_realsize{0};
529  };
530 
531  template<typename _ArrayType>
533  {
534  public:
537 
538  constexpr presorted_backend() = default;
539  constexpr presorted_backend(const _ArrayType& _Other)
540  : m_vec{_Other}
541  {}
542 
543  constexpr auto get_values() const noexcept { return m_vec.data(); }
544  constexpr auto get_index() const noexcept { return m_vec.data(); }
545  constexpr size_t realsize() const noexcept { return m_vec.size(); }
546 
547  private:
548  _ArrayType m_vec;
549  };
550 
551  // This is 'referring' backend of fixed size, it points to a external data
552  template<typename _IndexType, typename _ValueType>
554  {
555  public:
556  constexpr portable_backend() = default;
557 
558  using index_type = _IndexType;
559  using value_type = _ValueType;
560 
561  template<typename _ArrayType>
563  : m_values { _Other.get_values(), _Other.realsize() },
564  m_index { _Other.get_index(), _Other.realsize() }
565  {}
566 
567  constexpr auto get_values() const noexcept { return m_values.data(); }
568  constexpr auto get_index() const noexcept { return m_index.data(); }
569  constexpr size_t realsize() const noexcept { return m_values.size(); }
570  private:
573  };
574 
575 
576  template<typename _Traits, typename _Backend, typename _Duplicates = tag_DuplicatesNo>
578  {
579  public:
580  // standard definitions
581  using value_type = typename _Traits::value_type;
582  using size_type = std::size_t;
583  using difference_type = std::ptrdiff_t;
584  using reference = const value_type&;
585  using const_reference = const value_type&;
586  using pointer = const value_type*;
587  using const_pointer = const value_type*;
588  using iterator = const value_type*;
589  using const_iterator = const value_type*;
590  using reverse_iterator = std::reverse_iterator<iterator>;
591  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
592 
593  // non-standard definitions
594  using traits_type = _Traits;
595  friend class const_set_map_base<_Traits, void, _Duplicates>;
596 
597  using hash_type = typename _Traits::hash_type;
598  using intermediate = typename _Traits::key_type;
599  using init_key_type = typename _Traits::init_key_type;
600  using init_type = typename _Traits::init_type;
602 
603  static constexpr bool can_index = sorter_type::can_index;
604 
605  using index_type = std::conditional_t<
606  can_index,
607  hash_type,
608  typename _Traits::value_type>;
609 
612  _Backend>;
613 
614  // standard methods
615 
616  constexpr size_type size() const noexcept { return m_backend.realsize(); }
617  constexpr size_type max_size() const noexcept { return size(); }
618  constexpr size_type capacity() const noexcept { return m_backend.capacity(); }
619  constexpr bool empty() const noexcept { return size() == 0; }
620  constexpr const_iterator begin() const noexcept { return m_backend.get_values(); }
621  constexpr const_iterator cbegin() const noexcept { return begin(); }
622  constexpr const_iterator end() const noexcept { return begin() + m_backend.realsize(); }
623  constexpr const_iterator cend() const noexcept { return end(); }
624  constexpr const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator{ end() }; }
625  constexpr const_reverse_iterator rcbegin() const noexcept { return rbegin(); }
626  constexpr const_reverse_iterator rend() const noexcept { return const_reverse_iterator{ begin() }; }
627  constexpr const_reverse_iterator rcend() const noexcept { return rend(); }
628 
629  using key_compare = typename _Traits::hashed_key_type::value_compare;
630 
632  {
633  constexpr bool operator()( const value_type& l, const value_type& r ) const
634  {
635  return key_compare{}(_Traits::get_key(l), _Traits::get_key(r));
636  }
637  };
638 
640  {
641  template<typename _TL, typename _TR>
642  constexpr bool operator()(const _TL & l, const _TR & r ) const
643  {
644  return typename _Traits::hashed_key_type::hash_compare{}(_Traits::get_key(l), _Traits::get_key(r));
645  }
646  };
647 
649  {
650  init_key_type key{_key};
651  hash_type hash{key};
652  auto it = std::lower_bound(m_backend.get_index(), m_backend.get_index()+m_backend.realsize(), hash, hash_compare{});
653  auto offset = std::distance(m_backend.get_index(), it);
654  return begin() + offset;
655  }
657  {
658  init_key_type key{_key};
659  hash_type hash{key};
660  auto it = std::upper_bound(m_backend.get_index(), m_backend.get_index()+m_backend.realsize(), hash, hash_compare{});
661  auto offset = std::distance(m_backend.get_index(), it);
662  return begin() + offset;
663  }
664  std::pair<const_iterator, const_iterator>
666  {
667  init_key_type key{_key};
668  hash_type hash{key};
669  auto _range = std::equal_range(m_backend.get_index(), m_backend.get_index()+m_backend.realsize(), hash, hash_compare{});
670  return std::make_pair(
671  begin() + std::distance(m_backend.get_index(), _range.first),
672  begin() + std::distance(m_backend.get_index(), _range.second));
673  }
674 
676  {
677  auto it = lower_bound(_key);
678  if (it == end() || key_compare{}(_key, _Traits::get_key(*it)))
679  return end();
680  else
681  return it;
682  }
683 
684  size_t get_alignment() const
685  { // debug method for unit tests
686  return std::uintptr_t(m_backend.get_index()) % std::hardware_constructive_interference_size;
687  }
688 
689  // debug method for unit tests
690  const auto& get_backend() const noexcept { return m_backend; }
691 
692  static constexpr bool is_presorted = std::is_same_v<presorted_backend<const_vector<typename _Traits::value_type>>, backend_type>;
693 
694  constexpr const_set_map_base() = default;
695 
696  constexpr const_set_map_base(const backend_type& backend)
697  : m_backend{ backend }
698  {}
699 
700  template<
701  typename _Other,
702  typename _NotUsed = std::enable_if_t<
704  std::is_constructible<backend_type, typename _Other::backend_type
705  >::value>
706  >
707  constexpr const_set_map_base(const _Other& _other)
708  : m_backend{ _other.m_backend }
709  {}
710 
711  protected:
712 
713  template<typename _ArrayType>
714  static constexpr auto make_backend(const _ArrayType& init)
715  {
716  auto proxy = sorter_type::sort(init);
717  using backend_type = simple_backend<decltype(proxy)>;
718  return backend_type{proxy};
719  }
720 
721  template<typename _ArrayType>
722  static constexpr auto presorted(const _ArrayType& init)
723  {
725  return backend_type{init};
726  }
727 
729  };
730 
731 }
732 
733 namespace std
734 {
735  template<typename...TArgs>
736  constexpr size_t size(const compile_time_bits::const_set_map_base<TArgs...>& _container)
737  {
738  return _container.size();
739  }
740 }
741 
742 #include "ctsort_cxx14.hpp"
743 
744 #include "ct_crc32.hpp"
745 
746 
747 
748 #endif
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
static constexpr auto sort(_Init &&init) noexcept
static constexpr bool can_index
constexpr bool empty() const noexcept
constexpr const_reverse_iterator rcend() const noexcept
const_iterator lower_bound(intermediate _key) const
constexpr size_type capacity() const noexcept
std::pair< const_iterator, const_iterator > equal_range(intermediate _key) const
constexpr const_iterator begin() const noexcept
static constexpr auto make_backend(const _ArrayType &init)
constexpr size_type size() const noexcept
constexpr const_reverse_iterator rbegin() const noexcept
constexpr const_iterator end() const noexcept
constexpr const_iterator cbegin() const noexcept
constexpr const_iterator cend() const noexcept
const_iterator upper_bound(intermediate _key) const
constexpr const_reverse_iterator rend() const noexcept
const auto & get_backend() const noexcept
constexpr const_set_map_base(const _Other &_other)
constexpr size_type max_size() const noexcept
std::conditional_t< std::is_void< void >::value, portable_backend< index_type, value_type >, void > backend_type
constexpr const_reverse_iterator rcbegin() const noexcept
static constexpr auto presorted(const _ArrayType &init)
const_iterator find(intermediate _key) const
std::conditional_t< can_index, hash_type, typename _Traits::value_type > index_type
constexpr const_set_map_base()=default
constexpr const_set_map_base(const backend_type &backend)
constexpr size_type size() const noexcept
constexpr const_iterator begin() const noexcept
constexpr size_type max_size() const noexcept
constexpr const_vector(value_type const (&init)[N])
constexpr const_reverse_iterator rbegin() const noexcept
constexpr const_iterator cend() const noexcept
constexpr const_reverse_iterator rcbegin() const noexcept
constexpr const_reference front() const
constexpr bool empty() const noexcept
constexpr size_type capacity() const noexcept
constexpr const_reference at(size_t index) const
constexpr const_vector(const_pointer data, size_t size)
constexpr const_reverse_iterator rcend() const noexcept
constexpr const_reverse_iterator rend() const noexcept
constexpr const_vector(std::nullptr_t)
constexpr const_pointer data() const noexcept
constexpr const_iterator cbegin() const noexcept
constexpr const_vector(const std::array< value_type, N > &data)
constexpr const_iterator end() const noexcept
constexpr const_reference operator[](size_t index) const
constexpr const_reference back() const
constexpr const_vector()=default
const_vector< index_type > m_index
constexpr auto get_index() const noexcept
constexpr auto get_values() const noexcept
constexpr size_t realsize() const noexcept
const_vector< value_type > m_values
constexpr portable_backend()=default
constexpr portable_backend(const simple_backend< _ArrayType > &_Other)
typename _ArrayType::value_type value_type
constexpr auto get_index() const noexcept
constexpr presorted_backend(const _ArrayType &_Other)
typename _ArrayType::value_type index_type
constexpr size_t realsize() const noexcept
constexpr presorted_backend()=default
constexpr auto get_values() const noexcept
constexpr simple_backend(const std::pair< _SizeType, _ArrayType > &init)
constexpr size_t hardware_destructive_interference_size
constexpr std::underlying_type_t< Enum > to_underlying(Enum e) noexcept
typename remove_cvref< T >::type remove_cvref_t
constexpr size_t hardware_constructive_interference_size
char value[7]
Definition: config.c:431
#define N
Definition: crc32.c:57
#define T(s)
Definition: common.h:230
static void DLIST_NAME() init(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:40
static int type
Definition: getdata.c:31
unsigned int uintptr_t
Definition: ncbitype.h:197
typename real_underlying_type< T >::type real_underlying_type_t
constexpr real_underlying_type_t< Enum > to_real_underlying(Enum e) noexcept
constexpr auto to_array_impl(T &&a, std::index_sequence< I... >) -> std::array< _Elem, N >
std::integral_constant< ncbi::NStr::ECase, ncbi::NStr::eCase > tagStrCase
constexpr size_t get_array_size(T &&)
std::false_type tag_DuplicatesNo
typename array_elem< T >::type array_elem_t
constexpr auto make_array(T &&a)
std::true_type tag_DuplicatesYes
std::false_type tag_SortByValues
std::integral_constant< ncbi::NStr::ECase, ncbi::NStr::eNocase > tagStrNocase
std::true_type tag_SortByHashes
double value_type
The numeric datatype used by the parser.
Definition: muParserDef.h:228
const struct ncbi::grid::netcache::search::fields::KEY key
Magic spell ;-) needed for some weird compilers... very empiric.
unsigned int a
Definition: ncbi_localip.c:102
const char * tag
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
int offset
Definition: replacements.h:160
std::pair< typename DeduceType< _Types >::init_type... > init_type
std::pair< typename DeduceType< _Types >::value_type... > value_type
std::tuple< typename DeduceType< _Types >::value_type... > value_type
std::tuple< typename DeduceType< _Types >::init_type... > init_type
ct_basic_string< _CharType > view
constexpr bool operator()(const _TL &l, const _TR &r) const
constexpr bool operator()(const value_type &l, const value_type &r) const
typename straight_map_traits< _T1, _T2 >::init_type init_type
static constexpr const key_type & get_key(const key_type &v)
typename pair_type::value_type value_type
static constexpr value_type construct(const init_type &v)
static constexpr hash_type get_init_hash(const init_type &v)
static constexpr const key_type & get_key(const value_type &v)
typename hashed_key_type::init_type init_type
static constexpr hash_type get_init_hash(const init_type &v)
typename hashed_key_type::init_type init_key_type
static constexpr const key_type & get_key(const value_type &v)
typename hashed_key_type::hash_type hash_type
typename hashed_key_type::value_type key_type
static constexpr value_type construct(const init_type &v)
typename hashed_key_type::value_type value_type
static constexpr const key_type & get_key(const value_type &v)
static constexpr value_type construct(const init_type &v)
static constexpr hash_type get_init_hash(const init_type &v)
static constexpr const key_type & get_key(const key_type &v)
typename pair_type::init_type init_type
typename pair_type::value_type value_type
Definition: _hash_fun.h:40
std::remove_cv_t< std::remove_reference_t< T > > type
Definition: type.c:6
#define const
Definition: zconf.h:230
Modified on Thu Sep 21 03:45:59 2023 by modify_doxy.py rev. 669887