6 Commits 910944d9e8 ... 7594647623

Author SHA1 Message Date
  __vic 7594647623 Intel C++ compiler support removed 6 months ago
  __vic 89414fea00 Merge branch 'generic' into posix 6 months ago
  __vic 8889b1f206 Merge branch 'iso' into generic 6 months ago
  __vic 7f36372d79 C++17 is used by default 6 months ago
  __vic af017bed6e C++23 6 months ago
  __vic 903d69e71e __VIC_IF_CONSTEVAL added 1 year ago
8 changed files with 31 additions and 31 deletions
  1. 8 0
      ChangeLog
  2. 2 3
      doc/en/build.xml
  3. 3 3
      doc/en/general.xml
  4. 2 3
      doc/ru/build.xml
  5. 3 3
      doc/ru/general.xml
  6. 9 6
      include/__vic/_cfg.h
  7. 2 11
      src/GNUmakefile
  8. 2 2
      src/Makefile.freebsd

+ 8 - 0
ChangeLog

@@ -4,6 +4,14 @@ Legend:
     * Changes
     ! Important
 
+2023-10-06  __vic
+    + C++23 mode support
+    * C++17 is used by default
+    * Intel C++ compiler support removed
+
+2023-04-07  __vic
+    + __VIC_IF_CONSTEVAL
+
 2022-03-02  __vic
     - readonly_cstring: compare(const char *,readonly_cstring)
 

+ 2 - 3
doc/en/build.xml

@@ -6,7 +6,6 @@
 <list style="bulleted">
     <item>GNU C++ v 4.7+ [<tt>gcc</tt>]</item>
     <item>Clang v 3.4+ [<tt>clang</tt>]</item>
-    <item>Intel C++ 17.0+ [<tt>intel</tt>]</item>
 </list>
 
 <p>Go to <tt>src</tt> subdirectory and write:</p>
@@ -15,14 +14,14 @@ $ gmake
 </tty>
 <p>The library file will be built for you.</p>
 
-<p>C++14 is used by default but you can choose another language standard
+<p>C++17 is used by default but you can choose another language standard
 version using <tt>std</tt> option. E.g. to build the library in C++98 mode
 write:</p>
 <tty>
 $ gmake std=98
 </tty>
 
-<p>Available values include: 98, 11, 14, 17 and 20.</p>
+<p>Available values include: 98, 11, 14, 17, 20 and 23.</p>
 
 <p>Also you can choose the used compiler manually:</p>
 <tty>

+ 3 - 3
doc/en/general.xml

@@ -24,8 +24,8 @@ $ g++ -std=c++14 prog.cpp -l__vic14
 </tty>
 
 <p>The library can be built using one of the ISO C++ standards: C++98, C++11,
-C++14, C++17 or C++20. The standard suffix is used as a suffix for the library
-file (archive).</p>
+C++14, C++17, C++20 or C++23. The standard suffix is used as a suffix for the
+library file (archive).</p>
 
 <p>Some features require a specific minimal standard version to be available,
 e.g. many of them require at least C++11. These features are marked with
@@ -36,7 +36,7 @@ available otherwise. Such features are marked with <sign>C++98 only</sign>
 sign.</p>
 
 <p>Detailed description of the library components is provided in the subsequent
-chapters. Descriptions are grouped by headers. C++20 language syntax is mainly
+chapters. Descriptions are grouped by headers. C++23 language syntax is mainly
 used as a more complete and expressive one.</p>
 
 </chapter>

+ 2 - 3
doc/ru/build.xml

@@ -6,7 +6,6 @@
 <list style="bulleted">
     <item>GNU C++ v 4.7+ [<tt>gcc</tt>]</item>
     <item>Clang v 3.4+ [<tt>clang</tt>]</item>
-    <item>Intel C++ 17.0+ [<tt>intel</tt>]</item>
 </list>
 
 <p>Перейдите в подкаталог <tt>src</tt> и наберите:</p>
@@ -15,13 +14,13 @@ $ gmake
 </tty>
 <p>Файл библиотеки будет собран.</p>
 
-<p>По умолчанию используется C++14, но используя параметр <tt>std</tt> можно
+<p>По умолчанию используется C++17, но используя параметр <tt>std</tt> можно
 задать версию явно. Например для сборки в режиме C++98 наберите:</p>
 <tty>
 $ gmake std=98
 </tty>
 
-<p>Доступные значения включают: 98, 11, 14, 17 и 20.</p>
+<p>Доступные значения включают: 98, 11, 14, 17, 20 и 23.</p>
 
 <p>Также можно вручную выбрать используемый компилятор:</p>
 <tty>

+ 3 - 3
doc/ru/general.xml

@@ -24,8 +24,8 @@ $ g++ -std=c++14 prog.cpp -l__vic14
 </tty>
 
 <p>Библиотека может быть собрана с использованием одного из стандартов ISO C++:
-C++98, C++11, C++14, C++17 или C++20. Суффикс стандарта используется в качестве
-суффикса файла библиотеки (архива).</p>
+C++98, C++11, C++14, C++17, C++20 или C++23. Суффикс стандарта используется в
+качестве суффикса файла библиотеки (архива).</p>
 
 <p>Некоторые компоненты библиотеки требуют какую-то минимальную версию
 стандарта, например многие требуют использования как минимум C++11. Такие
@@ -38,6 +38,6 @@ C++98, C++11, C++14, C++17 или C++20. Суффикс стандарта ис
 
 <p>Детальное описание компонентов библиотеки приведено в последующих главах.
 Описание сгруппировано по заголовочным файлам. В основном используется синтаксис
-C++20, как более богатый и выразительный.</p>
+C++23, как более богатый и выразительный.</p>
 
 </chapter>

+ 9 - 6
include/__vic/_cfg.h

@@ -34,11 +34,6 @@
     __clang_major__ == 3 && __clang_minor__ >= 4)
 
 //////////////////////////////////////////////////////////////////////////////
-// Intel C++ 17.0 or higher
-//////////////////////////////////////////////////////////////////////////////
-#elif defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700
-
-//////////////////////////////////////////////////////////////////////////////
 // GNU C++ 4.7 or higher
 //////////////////////////////////////////////////////////////////////////////
 #elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 7)
@@ -181,7 +176,7 @@
 //////////////////////////////////////////////////////////////////////////////
 // Detect CPU type
 //////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER)
+#if defined(__GNUC__) || defined(__clang__)
 
 // x64 should be checked first because sometimes x86 macros are defined too
 #if defined(__x86_64__) || defined(__amd64__)
@@ -278,6 +273,14 @@
 #   define __VIC_CONSTEXPR14 inline
 #endif
 
+#if __cpp_if_consteval
+#   define __VIC_IF_CONSTEVAL if consteval
+#   define __VIC_IF_NOT_CONSTEVAL if !consteval
+#else
+#   define __VIC_IF_CONSTEVAL if(std::is_constant_evaluated())
+#   define __VIC_IF_NOT_CONSTEVAL if(!std::is_constant_evaluated())
+#endif
+
 #ifndef __has_include
 #   define __has_include(f) 0
 #endif

+ 2 - 11
src/GNUmakefile

@@ -2,12 +2,12 @@
 # GNU Make 3.82+ Makefile
 #
 # Usage:
-#   $ gmake [compiler={gcc|clang|intel}] [std={98|11|14|17|20}] [pic=1]
+#   $ gmake [compiler={gcc|clang}] [std={98|11|14|17|20|23}] [pic=1]
 
 include ../src/defs.mk
 OBJSUFF = o
 ARSUFF = a
-std = 14
+std = 17
 
 ifndef compiler
 OS := $(shell uname)
@@ -30,15 +30,6 @@ CC     := clang++ -std=c++$(std) -pthread
 CFLAGS := -pedantic-errors -DNDEBUG -O3
 WARNS  := $(if $(filter 98,$(std)),-Wno-long-long )-Wno-non-literal-null-conversion
 CFLAGS_PIC = -fPIC -fvisibility=hidden -fvisibility-inlines-hidden
-##############################################################################
-else ifeq ($(compiler),intel)
-ifeq ($(std),98)
-$(error C++98 mode is not supported by Intel compiler)
-endif
-CC     := icpc -std=c++$(std) -pthread
-CFLAGS := -pedantic-errors -DNDEBUG -O3 -ffunction-sections -fdata-sections
-WARNS  :=
-CFLAGS_PIC = -fPIC -fvisibility=hidden -fvisibility-inlines-hidden
 endif
 ##############################################################################
 

+ 2 - 2
src/Makefile.freebsd

@@ -2,12 +2,12 @@
 # FreeBSD 10+ bmake Makefile
 #
 # Usage:
-#   $ make -f Makefile.freebsd [compiler={clang|gcc}] [std={98|11|14|17|20}] [pic=1]
+#   $ make -f Makefile.freebsd [compiler={clang|gcc}] [std={98|11|14|17|20|23}] [pic=1]
 
 .include "../src/defs.mk"
 OBJSUFF = o
 ARSUFF = a
-std = 14
+std = 17
 compiler = clang
 
 ##############################################################################