Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Commit 2019-08-25 - Looking for a more independent solution.
  • cxxomfort: Warning: this commit breaks for Clang.
  • cxxomfort: Renamed CXXO_COMPILER_SUPPORT_cstd_... to CXXO_CXXSTDHEADER_... .
  • cxxomfort: Reworked some macros related to TR1 and its headers/namespaces to be more uniform.
  • cxxomfort: Taken the first steps in removing the need for a TR1 forwarder, with <array>.
  • array: Fixed detecting an <array> that is not there in MSVC 2005 (enhances: [11f57a70cf]).
  • array: Testing removal of requirement for a TR1 forwarder in the header.
  • cerrno: Added header, with definitions of some later POSIX error code macros for MSVC (enhances: [11f57a70cf]).
  • functional: Fixed visibility of (tr1::)hash when in GCC/Clang with TR1.
  • functional: Added baseline implementations for reference_wrapper, hash when before C++03.
  • random: Fixed detecting a <random> that is not there in MSVC 2005 (enhances: [11f57a70cf]).
  • random: Testing removal of requirement for a TR1 forwarder in the header.
  • type_traits: Testing ability to fake some intrinsics for is_enum, et al, in OpenWatcom (enhances: [b8ea55b791]).
  • system_error: Removed a warning of conversion to bool when in MSVC.
  • utility: Fixed make_integer_sequence et al, to use C++11 using... = where appropriate.
  • library:array_ref: Made def-ctor trivial in C++11 and do the "right thing" in <C++11.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | msvc_max_1700 | pre-release | y2019 | gcc_min_404 | msvc_min_1599
Files: files | file ages | folders
SHA3-256:deb4709981f729f996387add1948561149ee251f19b5051fc6d5e4c0fd63252e
User & Date: luismachuca 2019-08-26 04:23:00
Context
2019-08-28
19:57
Commit 2019-08-28 - MSVC and the End of <time.h>s as we Know Itâ„¢
  • config: Fixed namespace placement of ere-TR1 features in MSVC 2010, 2012 (enhances: [70b70d8017]).
  • ctime: Added header with backports for timespec_get.
  • algorithm: Moved copy_if_not out of std and into its proper location in supplement.
  • algorithm: Documentation of algorithms now points to the corresponding cppreference page.
  • ios: Added header, with backport of C++11 io_errc.
  • ios: Added missing left,right manips to ios in OpenWatcom (enhances: [b8ea55b791]).
  • memory: Fixed to_bool of shared_ptr when the latter is unavailable (enhances: [11f57a70cf]).
  • numeric: Added midpoint, from C++20.
  • string_view: Fixed implementation to not use inheritance.
  • string_view: Fixed an issue where it did not include the correct <system_error> implementation.
  • typeindex: Removed a warning of conversion to bool when in MSVC.
  • type_traits: Fixed is_base_of for Clang 2.8, 3.0 (enhances: [1cbdc0b48d]).
  • library:string: ifdef-out the header for pre-C++1997 mode.
  • library:string: Partially extended support for variadic to_string.
  • library:utility: ifdef-out the header for pre-C++1997 mode.
  • library:typesafe_enum: Now default-constructs to 0 to emulate enum class behaviour.
  • tags: Updated with new information on macros.
check-in: 44499e7b user: luismachuca tags: trunk
2019-08-26
04:23
Commit 2019-08-25 - Looking for a more independent solution.
  • cxxomfort: Warning: this commit breaks for Clang.
  • cxxomfort: Renamed CXXO_COMPILER_SUPPORT_cstd_... to CXXO_CXXSTDHEADER_... .
  • cxxomfort: Reworked some macros related to TR1 and its headers/namespaces to be more uniform.
  • cxxomfort: Taken the first steps in removing the need for a TR1 forwarder, with <array>.
  • array: Fixed detecting an <array> that is not there in MSVC 2005 (enhances: [11f57a70cf]).
  • array: Testing removal of requirement for a TR1 forwarder in the header.
  • cerrno: Added header, with definitions of some later POSIX error code macros for MSVC (enhances: [11f57a70cf]).
  • functional: Fixed visibility of (tr1::)hash when in GCC/Clang with TR1.
  • functional: Added baseline implementations for reference_wrapper, hash when before C++03.
  • random: Fixed detecting a <random> that is not there in MSVC 2005 (enhances: [11f57a70cf]).
  • random: Testing removal of requirement for a TR1 forwarder in the header.
  • type_traits: Testing ability to fake some intrinsics for is_enum, et al, in OpenWatcom (enhances: [b8ea55b791]).
  • system_error: Removed a warning of conversion to bool when in MSVC.
  • utility: Fixed make_integer_sequence et al, to use C++11 using... = where appropriate.
  • library:array_ref: Made def-ctor trivial in C++11 and do the "right thing" in <C++11.
check-in: deb47099 user: luismachuca tags: trunk, msvc_max_1700, pre-release, y2019, gcc_min_404, msvc_min_1599
2019-08-22
19:09
Commit 2019-08-22 - A forgotten error in <memory>.
  • config: Updated some changes to documentation.
  • memory: Fixed a wrong argument name in uninitialized_default_construct.
  • system_error: Fixed errc not default-constructing to zero in C++03 like enums do.
  • docgen: Improved documentation for library:tuple, library:typesafe_enum.
check-in: d5fcc075 user: luismachuca tags: trunk, y2019, gcc_min_404, clang_min_302, docgen, openwatcom_min_200
Changes

Changes to cxxomfort/CHANGELOG.txt.

            1  +Commit 2019-08-25 - Looking for a more independent solution.
            2  +
            3  +  *  cxxomfort: Warning: this commit breaks for Clang.
            4  +  *  cxxomfort: Renamed <tt>CXXO_COMPILER_SUPPORT_cstd_...</tt> to <tt>CXXO_CXXSTDHEADER_...</tt> .
            5  +  *  cxxomfort: Reworked some macros related to TR1 and its headers/namespaces to be more uniform.
            6  +  *  cxxomfort: Taken the first steps in removing the need for a TR1 forwarder, with <array>.
            7  +  *  array: Fixed detecting an <array> that is not there in MSVC 2005 (enhances: [11f57a70cf]).
            8  +  *  array: Testing removal of requirement for a TR1 forwarder in the header.
            9  +  *  cerrno: Added header, with definitions of some later POSIX error code macros for MSVC (enhances: [11f57a70cf]).
           10  +  *  functional: Fixed visibility of (tr1::)hash when in GCC/Clang with TR1.
           11  +  *  functional: Added baseline implementations for reference_wrapper, hash when before C++03.
           12  +  *  random: Fixed detecting a <random> that is not there in MSVC 2005 (enhances: [11f57a70cf]).
           13  +  *  random: Testing removal of requirement for a TR1 forwarder in the header.
           14  +  *  type_traits: Testing ability to fake some intrinsics for is_enum, et al, in OpenWatcom (enhances: [b8ea55b791]).
           15  +  *  system_error: Removed a warning of conversion to bool when in MSVC.
           16  +  *  utility: Fixed <tt>make_integer_sequence</tt> et al, to use C++11 <tt>using... = </tt> where appropriate.
           17  +  *  library:array_ref: Made def-ctor trivial in C++11 and do the "right thing" in <C++11.
           18  +
           19  +
     1     20   Commit 2019-08-22 - A forgotten error in <memory>.
     2     21   
     3     22     *  config: Updated some changes to documentation.
     4     23     *  memory: Fixed a wrong argument name in <tt>uninitialized_default_construct</tt>.
     5     24     *  system_error: Fixed <tt>errc</tt>  not default-constructing to zero in C++03 like enums do.
     6     25     *  docgen: Improved documentation for library:tuple, library:typesafe_enum.
     7     26   

Changes to cxxomfort/cxxomfort/array.hpp.

     5      5    *
     6      6    */
     7      7   
     8      8   #include <cxxomfort/config.hpp>
     9      9   #include <cxxomfort/base.hpp>
    10     10   
    11     11   
    12         -#if (CXXOMFORT_CXX_STD<1997 && CXXO_COMPILER_SUPPORT_tr1_array==0)
    13         -#include "impl/03-array.hpp"
           12  +#if (CXXOMFORT_CXX_STD<1997 && defined CXXO_USE_INTERNAL_TR1)
           13  +	// not even C++03
           14  +	#include "impl/07-array.hpp"
    14     15   
    15         -namespace std {
    16         -	using ::cxxomfort::cxxostd::array::array;
    17         -}
           16  +#elif (CXXOMFORT_CXX_STD < 2011 && CXXOFLAG_tr1 > 0)
           17  +	// c++03, with TR1
           18  +	#if (CXXOFLAG_directory_tr1>0)
           19  +		#include <tr1/array>
           20  +	#else 
           21  +		#include <array>
           22  +	#endif
    18     23   
    19         -#elif (CXXOMFORT_CXX_STD < 2011)
    20         -
    21         -	#include <array>
    22     24   	#if (CXXOFLAG_namespace_tr1>0)
    23         -
    24     25   namespace std {
    25     26       using tr1::array;
    26     27       using tr1::get;
    27     28   }
    28         -
    29         -	#elif (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,<1600) )
    30         -namespace std {
    31         -	using tr1::array;
    32         -	using tr1::get;
    33         -}
    34         -
    35     29   	#endif
    36     30   
    37     31   #else // C++>=2011
    38     32   	#include <array>
    39     33   #endif // CXX_STD
    40     34   
    41     35   #endif

Changes to cxxomfort/cxxomfort/backports.hpp.

    13     13    * utilities as well as the available backports for the major 
    14     14    * standard headers in the library.
    15     15    * 
    16     16    * */
    17     17   #include "config.hpp"
    18     18   #include "base.hpp"
    19     19   
           20  +#include "cerrno.hpp" // #define s for errno values
    20     21   #include "algorithm.hpp" // <algorithm> backports (copy_if, minmax, etc...)
    21     22   #include "cstddef.hpp" // <cstddef> backports (byte, nullptr, etc...)
    22     23   #include "cstdint.hpp" // <cstdint> backports (integer types)
    23     24   #include "iterator.hpp" // <iterator> backports (begin, end, size, data, etc...)
    24     25   #include "string.hpp" // <string> backports (to_string, etc...)
    25     26   #include "utility.hpp" // <utility> backports (declval, exchange, pair, etc...)
    26     27   
................................................................................
    34     35   #include "memory.hpp" // <memory> backports (pointer_traits, alignof, unique_ptr, etc...)
    35     36   #include "numeric.hpp" // <numeric> backports (iota, etc...)
    36     37   #include "random.hpp" // <random> backports (rename fixes, std::random_device, etc...)
    37     38   #include "system_error.hpp" // <system_error> backports
    38     39   #include "tuple.hpp" // <tuple> backports (tuple get<type>, etc...)
    39     40   #include "type_traits.hpp" // <type_traits> backports (common_type, decay, is_literal, is_null_pointer, etc...)
    40     41   
           42  +#include "ios.hpp" // <ios> stuff.
    41     43   #endif

Added cxxomfort/cxxomfort/cerrno.hpp.

            1  +#ifndef CXXOMFORT_CERRNO_HPP
            2  +#define CXXOMFORT_CERRNO_HPP
            3  +/**
            4  + * @file
            5  + * @brief Implementations and completion of names tied to <cerrno>.
            6  + * @xrefitem std0cerrno "<cerrno>" ""
            7  + *
            8  + */
            9  +
           10  +#include "config.hpp"
           11  +#include "base.hpp"
           12  +#include CXXO_INCLUDE_SYS(cerrno)
           13  +
           14  +// 
           15  +// these elements are - in theory - only needed pre-C++11
           16  +// 
           17  +
           18  +#if (CXXOMFORT_CXX_STD < 2011)
           19  +
           20  +	#if 0
           21  +	#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC)
           22  +		// drawn from the <cerrno> for MSVC 2013
           23  +		// section "POSIX supplement"
           24  +#ifndef EADDRINUSE
           25  +#define EADDRINUSE      100
           26  +#endif
           27  +#ifndef EADDRNOTAVAIL
           28  +#define EADDRNOTAVAIL   101
           29  +#endif
           30  +#ifndef EAFNOSUPPORT
           31  +#define EAFNOSUPPORT    102
           32  +#endif
           33  +#ifndef EALREADY
           34  +#define EALREADY        103
           35  +#endif
           36  +#ifndef EBADMSG
           37  +#define EBADMSG         104
           38  +#endif
           39  +#ifndef ECANCELED
           40  +#define ECANCELED       105
           41  +#endif
           42  +#ifndef ECONNABORTED
           43  +#define ECONNABORTED    106
           44  +#endif
           45  +#ifndef ECONNREFUSED	
           46  +#define ECONNREFUSED    107
           47  +#endif
           48  +#ifndef ECONNRESET
           49  +#define ECONNRESET      108
           50  +#endif
           51  +#ifndef EDESTADDRREQ
           52  +#define EDESTADDRREQ    109
           53  +#endif
           54  +#ifndef EHOSTUNREACH
           55  +#define EHOSTUNREACH    110
           56  +#endif
           57  +#ifndef EIDRM
           58  +#define EIDRM           111
           59  +#endif
           60  +#ifndef EINPROGRESS
           61  +#define EINPROGRESS     112
           62  +#endif
           63  +#ifndef EISCONN
           64  +#define EISCONN         113
           65  +#endif
           66  +#ifndef ELOOP
           67  +#define ELOOP           114
           68  +#endif
           69  +#ifndef EMSGSIZE
           70  +#define EMSGSIZE        115
           71  +#endif
           72  +#ifndef ENETDOWN
           73  +#define ENETDOWN        116
           74  +#endif
           75  +#ifndef ENETRESET
           76  +#define ENETRESET       117
           77  +#endif
           78  +#ifndef ENETUNREACH
           79  +#define ENETUNREACH     118
           80  +#endif
           81  +#ifndef ENOBUFS
           82  +#define ENOBUFS         119
           83  +#endif
           84  +#ifndef ENODATA
           85  +#define ENODATA         120
           86  +#endif
           87  +#ifndef ENOLINK
           88  +#define ENOLINK         121
           89  +#endif
           90  +#ifndef ENOMSG
           91  +#define ENOMSG          122
           92  +#endif
           93  +#ifndef ENOPROTOOPT
           94  +#define ENOPROTOOPT     123
           95  +#endif
           96  +#ifndef ENOSR
           97  +#define ENOSR           124
           98  +#endif
           99  +#ifndef ENOSTR
          100  +#define ENOSTR          125
          101  +#endif
          102  +#ifndef ENOTCONN
          103  +#define ENOTCONN        126
          104  +#endif
          105  +#ifndef ENOTRECOVERABLE
          106  +#define ENOTRECOVERABLE 127
          107  +#endif
          108  +#ifndef ENOTSOCK
          109  +#define ENOTSOCK        128
          110  +#endif
          111  +#ifndef ENOTSUP
          112  +#define ENOTSUP         129
          113  +#endif
          114  +#ifndef EOPNOTSUPP
          115  +#define EOPNOTSUPP      130
          116  +#endif
          117  +#ifndef EOTHER
          118  +#define EOTHER          131
          119  +#endif
          120  +#ifndef EOVERFLOW
          121  +#define EOVERFLOW       132
          122  +#endif
          123  +#ifndef EOWNERDEAD
          124  +#define EOWNERDEAD      133
          125  +#endif
          126  +#ifndef EPROTO
          127  +#define EPROTO          134
          128  +#endif
          129  +#ifndef EPROTONOSUPPORT
          130  +#define EPROTONOSUPPORT 135
          131  +#endif
          132  +#ifndef EPROTOTYPE
          133  +#define EPROTOTYPE      136
          134  +#endif
          135  +#ifndef ETIME
          136  +#define ETIME           137
          137  +#endif
          138  +#ifndef ETIMEDOUT
          139  +#define ETIMEDOUT       138
          140  +#endif
          141  +#ifndef ETXTBSY
          142  +#define ETXTBSY         139
          143  +#endif
          144  +#ifndef EWOULDBLOCK
          145  +#define EWOULDBLOCK     140
          146  +#endif
          147  +
          148  +
          149  +	#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
          150  +		// drawn from the <cerrno> for GCC 4.9
          151  +		#include <errno.h>
          152  +		#include <unistd.h>
          153  +	#endif
          154  +#endif
          155  +
          156  +
          157  +#endif

Changes to cxxomfort/cxxomfort/config.hpp.

   214    214       #define CXXOMFORT_ARCHITECTURE 0
   215    215   #endif
   216    216   
   217    217   
   218    218   /*
   219    219    * Opens the namespace where tr1 extensions live
   220    220    * */
   221         -#if ((CXXOMFORT_CXX_STD < 2011) && (\
   222         -    (CXXOMFORT_CXX_EMULATION < 2011 && CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC) || \
   223         -    (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG) || \
   224         -    (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC && CXXOMFORT_COMPILER_VERSION < 1600) \
   225         -) )
   226         -	#define CXXOFLAG_namespace_tr1 1
   227         -    #define CXXO_namespace_tr1 std::tr1
   228         -    #define CXXO_OPEN_STDTR1() namespace std { namespace tr1 {
   229         -    #define CXXO_CLOSE_STDTR1() } }
   230         -    #if (defined(CXXOMFORT_NOTICES) && CXXOMFORT_NOTICES > 1)
   231         -		#pragma message CXXO_NOTICE ("namespace tr1")
   232         -	#endif
   233         -#else 
   234         -	#define CXXOFLAG_namespace_tr1 0
   235         -    #define CXXO_namespace_tr1 std
   236         -    #define CXXO_OPEN_STDTR1() namespace std { 
   237         -    #define CXXO_CLOSE_STDTR1() } 
   238         -#endif
   239         -
   240    221   
   241    222   //
   242    223   // ---------------------------------------------------------
   243    224   //
   244    225   
   245    226   // Macros to conditionally generate keywords
   246    227   
................................................................................
   473    454    * 
   474    455    * This section describes the various values that provide information 
   475    456    * about cxxomfort and the values they can take.
   476    457    * 
   477    458    * **Version information**:
   478    459    * 
   479    460    * * @c CXXOMFORT_DATE - date of release.
   480         - * * @c CXXOMFORT_VERSION - version number.
          461  + * * @c CXXOMFORT_VERSION - version number (to be deprecated).
   481    462    * * @c CXXOMFORT_CXX_STD - the year of the C++ Standard running in the compiler.
   482    463    * * @c CXXOMFORT_CXX_EMULATION - the year of the standard emulated by the compiler.
   483    464    * 
   484    465    * **Informative macros**:
   485    466    * 
   486    467    * * @c CXXOMFORT_NOTICES - enables diagnostic messages.
   487         - * * @c CXXO_namespace_tr1 - has the name of the namespace where TR1 names live.
          468  + * * @c CXXO_STDTR1_NAME() - has the name of the namespace where TR1 names live.
          469  + * * @c CXXO_STDTR1_OPEN() , @c CXXO_STDTR1_CLOSE() - open and close the namespace where TR1 things live
   488    470    * 
   489    471    * 
   490    472    * **Code Generation**:
          473  + * 
          474  + * * @c CXXOFLAG_USE_INTERNAL_TR1 - if defined by the user in pre-C++11 mode, attempt to use some baseline TR1 features defined by cxxomfort.
   491    475    * 
   492    476    * See @ref cxxomfort-codegen .
   493    477    * 
   494    478    */
   495    479   
   496    480   /**
   497    481    * @page cxxomfort-fix

Changes to cxxomfort/cxxomfort/config/_support.hpp.

    32     32   
    33     33   //! If compiler supports a <tt>__alignof</tt> intrinsic.
    34     34   #define CXXO_COMPILER_SUPPORT___alignof 0 
    35     35   //! If compiler supports the type-category intrinsics (is_enum, is_class, is_union).
    36     36   #define CXXO_COMPILER_SUPPORT_type_intrinsics 0 
    37     37   //! If compiler provides support for <code>\<functional\></code>'s classic binders.
    38     38   #define CXXO_COMPILER_SUPPORT_functional_oldstyle (CXXOMFORT_CXX_STD<2017)
    39         -//! If compiler includes <array> features in std::tr1
           39  +//! If compiler declares std::tr1::array<> et al.
    40     40   #define CXXO_COMPILER_SUPPORT_tr1_array 0
    41         -//! If compiler includes <cstdint> features in std::tr1
           41  +//! If compiler declares std::tr1::uint16_t et al.
    42     42   #define CXXO_COMPILER_SUPPORT_tr1_cstdint 0
    43         -//! If compiler includes <random> features in std::tr1
           43  +//! If compiler declares std::tr1::uniform_int_distribution et al.
    44     44   #define CXXO_COMPILER_SUPPORT_tr1_random 0
    45         -//! If compiler includes <tuple> features in std::tr1
           45  +//! If compiler declares std::tr1::tuple<> et al.
    46     46   #define CXXO_COMPILER_SUPPORT_tr1_tuple 0
    47         -//! If compiler includes <type_traits> features in std::tr1
           47  +//! If compiler declares std::tr1::is_const<> et al.
    48     48   #define CXXO_COMPILER_SUPPORT_tr1_type_traits 0
    49         -//! If compiler provides support for @c __typeof__ in C++03.
           49  +//! If compiler provides support for @c __typeof__ eg.: in C++03.
    50     50   #define CXXO_COMPILER_SUPPORT_typeof 0
    51     51   //! If compiler provides support for variadic macros (<code>__VA_ARG__</code>).
    52     52   #define CXXO_COMPILER_SUPPORT_va_args 0
    53     53   
           54  +#define CXXO_STDTR1_OPEN() STDTR1_OPEN() namespace std  {
           55  +#define CXXO_STDTR1_CLOSE()  }
           56  +#define CXXO_STDTR1_NAME() std::tr1 
           57  +#define CXXOFLAG_directory_tr1 0
           58  +#define CXXOFLAG_namespace_tr1 0
           59  +
    54     60   // c++11 stuff
    55     61   
           62  +//! If compiler provides a <array> header
           63  +#define CXXO_CXXSTDHEADER_array (CXXOMFORT_CXX_STD>=2011)
           64  +//! If compiler provides a <cinttypes> header
           65  +#define CXXO_CXXSTDHEADER_cinttypes (CXXOMFORT_CXX_STD>=2011)
           66  +//! If compiler provides a <cstdint> header
           67  +#define CXXO_CXXSTDHEADER_cstdint (CXXOMFORT_CXX_STD>=2011)
           68  +//! If compiler supports <cuchar> header.
           69  +#define CXXO_CXXSTDHEADER_cuchar (CXXOMFORT_CXX_STD>=2011)
           70  +//! If compiler brings <random> header.
           71  +#define CXXO_CXXSTDHEADER_random (CXXOMFORT_CXX_STD>=2011)
           72  +//! If compiler brings <system_error> header.
           73  +#define CXXO_CXXSTDHEADER_system_error (CXXOMFORT_CXX_STD>=2011)
           74  +//! If compiler brings <tuple> header.
           75  +#define CXXO_CXXSTDHEADER_tuple (CXXOMFORT_CXX_STD>=2011)
           76  +//! If compiler brings <typeindex> header.
           77  +#define CXXO_CXXSTDHEADER_typeindex (CXXOMFORT_CXX_STD>=2011)
           78  +//! If compiler brings <type_traits> header.
           79  +#define CXXO_CXXSTDHEADER_type_traits (CXXOMFORT_CXX_STD>=2011)
           80  +
    56     81   //! If compiler provides support for alignment tools (@c alignas , @c aligned_storage , etc).
    57     82   #define CXXO_COMPILER_SUPPORT_alignment_tools 0
    58     83   //! If compiler provides support for @c alignof(T) .
    59     84   #define CXXO_COMPILER_SUPPORT_alignof 0
    60     85   //! If compiler provides support for <code>[[__attribute__]]</code>.
    61     86   #define CXXO_COMPILER_SUPPORT_attribute (CXXOMFORT_CXX_STD >= 2011)
    62     87   //! If compiler supports new (type-deduction) semantics for @c auto .
................................................................................
    67     92   #define CXXO_COMPILER_SUPPORT_charn_t_IS_TYPEDEF 0
    68     93   //! If compiler provides support for variadic common_type
    69     94   #define CXXO_COMPILER_SUPPORT_common_type (CXXOMFORT_CXX_STD>=2011)
    70     95   //! If compiler provides support for the new C++11 helpers std::enable_if, std::conditional.
    71     96   #define CXXO_COMPILER_SUPPORT_conditional_enableif (CXXOMFORT_CXX_STD>=2011)
    72     97   //! If compiler provides support for @c constexpr .
    73     98   #define CXXO_COMPILER_SUPPORT_constexpr (CXXOMFORT_CXX_STD>=2011)
    74         -//! If compiler provides a <cinttypes> header
    75         -#define CXXO_COMPILER_SUPPORT_cstd_cinttypes (CXXOMFORT_CXX_STD>=2011)
    76         -//! If compiler provides a <cstdint> header
    77         -#define CXXO_COMPILER_SUPPORT_cstd_cstdint (CXXOMFORT_CXX_STD>=2011)
    78         -//! If compiler supports <cuchar> header.
    79         -#define CXXO_COMPILER_SUPPORT_cstd_cuchar (CXXOMFORT_CXX_STD>=2011)
    80         -//! If compiler brings <system_error> header.
    81         -#define CXXO_COMPILER_SUPPORT_cstd_system_error (CXXOMFORT_CXX_STD>=2011)
    82         -//! If compiler brings <typeindex> header.
    83         -#define CXXO_COMPILER_SUPPORT_cstd_typeindex (CXXOMFORT_CXX_STD>=2011)
    84     99   //! If compiler supports @c decltype(expr) .
    85    100   #define CXXO_COMPILER_SUPPORT_decltype (CXXOMFORT_CXX_STD>=2011)
    86    101   //! If compiler provides support for <code>=default</code>-ed and <code>=delete</code>-d members.
    87    102   #define CXXO_COMPILER_SUPPORT_default_delete (CXXOMFORT_CXX_STD>=2011)
    88    103   //! If compiler provides support for scoped enumerations ie.: <code>enum class...</code>.
    89    104   #define CXXO_COMPILER_SUPPORT_enum_class (CXXOMFORT_CXX_STD>=2011)
    90    105   //! If compiler provides support for <code>explicit operator ...</code> casts.
................................................................................
   139    154   //! If compiler provides support for "integer_sequence".
   140    155   #define CXXO_COMPILER_SUPPORT_integer_sequence (CXXOMFORT_CXX_STD >= 2014)
   141    156   //! If compiler provides support for C++14's nonstatic data member init (NSDMI)
   142    157   #define CXXO_COMPILER_SUPPORT_nsdmi (CXXOMFORT_CXX_STD>=2014)
   143    158   
   144    159   // c++17 stuff
   145    160   
          161  +//! If compiler provides a <charconv> header
          162  +#define CXXO_CXXSTDHEADER_charconv (CXXOMFORT_CXX_STD>=2017)
          163  +//! If compiler provides a <string_view> header
          164  +#define CXXO_CXXSTDHEADER_string_view (CXXOMFORT_CXX_STD>=2017)
   146    165   //! If compiler provides support for C++14's [[nodiscard]]
   147    166   #define CXXO_COMPILER_SUPPORT_attribute_nodiscard (CXXOMFORT_CXX_STD>=2017)
   148    167   //! If compiler support static assert with no message (n3928)
   149    168   #define CXXO_COMPILER_SUPPORT_static_assert_17 (CXXOMFORT_CXX_STD >= 2017)
   150    169   //! If compiler provides support for C++17's std::byte
   151    170   #define CXXO_COMPILER_SUPPORT_std_byte (CXXOMFORT_CXX_STD>=2017)
   152    171   //! If compiler provides support for C++17's void_t and make_void
   153    172   #define CXXO_COMPILER_SUPPORT_std_voidt (CXXOMFORT_CXX_STD>=2017)
   154    173   
   155    174   
   156    175   // c++20 stuff
   157    176   
   158    177   //! If compiler provides support for endianness tag (std::endian)
   159         -#define CXXO_COMPILER_SUPPORT_cstd_endian (CXXOMFORT_CXX_STD>=2020)
          178  +#define CXXO_CXXSTDHEADER_endian (CXXOMFORT_CXX_STD>=2020)
   160    179   
   161    180   
   162    181   
   163    182   //------------------------------------------------
   164    183   /*
   165    184    * List of C++ features for documentation
   166    185    * 

Changes to cxxomfort/cxxomfort/config/clang.hpp.

   132    132   
   133    133   
   134    134   
   135    135   // -- TODO -- get my claws on clang >= 3.2
   136    136   // -- NEW TODO -- get my claws on clang >= 5.0 (2019-01)
   137    137   
   138    138   #if (CXXOMFORT_COMPILER_VERSION > 300 && CXXOMFORT_COMPILER_VERSION < 400)
   139         -	#if (CXXO_COMPILER_SUPPORT_cstd_cuchar)
   140         -		#undef  CXXO_COMPILER_SUPPORT_cstd_cuchar
   141         -		#define CXXO_COMPILER_SUPPORT_cstd_cuchar 0
          139  +	#if (CXXO_CXXSTDHEADER_cuchar)
          140  +		#undef  CXXO_CXXSTDHEADER_cuchar
          141  +		#define CXXO_CXXSTDHEADER_cuchar 0
   142    142   	#endif
   143    143   #endif
   144    144   
   145    145   // treats ::max_align_t differently depending on stdlib or libc++
   146    146   #if (CXXOMFORT_CXX_STD<2011)
   147    147   	#if (defined(_LIBCPP))
   148    148   	#else

Changes to cxxomfort/cxxomfort/config/gcc.hpp.

    72     72       #define CXXO_WARNING(msg) CXXO_NOTICE_IMPL_( "cxxomfort warning: " msg)
    73     73   #endif
    74     74   
    75     75   #if defined(CXXOMFORT_NOTICES)
    76     76       #pragma message( CXXO_NOTICE("Found the GNU C++ Compiler."))
    77     77   #endif
    78     78   
    79         -#if defined(_LIBCPP)
           79  +#if (CXXOMFORT_NOTICES > 1 && defined(_LIBCPP))
    80     80   	#pragma message CXXO_NOTICE("with libcxx")
    81     81   #endif
    82     82   
    83     83   /** GCC old versions define __cplusplus to be 1 but still have 
    84     84    * some good C++1997 and C++2003 support.
    85     85    * */
    86     86   #if (CXXOMFORT_COMPILER_VERSION >= 400 && CXXOMFORT_COMPILER_VERSION <= 406 \
................................................................................
   113    113   
   114    114   #undef  CXXO_COMPILER_SUPPORT___alignof
   115    115   #define CXXO_COMPILER_SUPPORT___alignof 1
   116    116   #undef  CXXO_COMPILER_SUPPORT_typeof
   117    117   #define CXXO_COMPILER_SUPPORT_typeof 1
   118    118   #undef  CXXO_COMPILER_SUPPORT_va_args
   119    119   #define CXXO_COMPILER_SUPPORT_va_args 1
          120  +
          121  +// 
          122  +// GCC in C++03 mode includes TR1 headers in all its versions, so far.
          123  +// 
   120    124   
   121    125   #if (CXXOMFORT_CXX_STD >= 1997 && CXXOMFORT_CXX_STD < 2011 && CXXOMFORT_CXX_EMULATION < 2011)
   122         -	#undef  CXXOFLAG_namespace_tr1 
   123         -	#define CXXOFLAG_namespace_tr1 1
          126  +	#undef  CXXOFLAG_tr1
          127  +	#define CXXOFLAG_tr1 1
   124    128   #endif
   125    129   
   126    130   // set up TR1 headers
   127         -#if (CXXOFLAG_namespace_tr1>0)
          131  +#if (CXXOFLAG_tr1 > 0)
          132  +	// TR1 stuff is under directory tr1/
          133  +	#undef  CXXOFLAG_directory_tr1
          134  +	#define CXXOFLAG_directory_tr1 1
          135  +	// TR1 stuff is defined under namespace std::tr1
          136  +	#undef  CXXOFLAG_namespace_tr1 
          137  +	#define CXXOFLAG_namespace_tr1 1
   128    138   	#undef  CXXO_COMPILER_SUPPORT_tr1_array
   129    139   	#define CXXO_COMPILER_SUPPORT_tr1_array 1
   130    140       #undef  CXXO_COMPILER_SUPPORT_tr1_cstdint
   131    141       #define CXXO_COMPILER_SUPPORT_tr1_cstdint 1
   132    142       #undef  CXXO_COMPILER_SUPPORT_tr1_random
   133    143       #define CXXO_COMPILER_SUPPORT_tr1_random 1
   134    144       #undef  CXXO_COMPILER_SUPPORT_tr1_type_traits
   135    145       #define CXXO_COMPILER_SUPPORT_tr1_type_traits 1
   136    146       #undef  CXXO_COMPILER_SUPPORT_tr1_tuple
   137    147       #define CXXO_COMPILER_SUPPORT_tr1_tuple 1
          148  +	#define CXXO_CXXSTDHEADER_tr1_array 1
          149  +	#define CXXO_CXXSTDHEADER_tr1_cstdint 1
          150  +	#define CXXO_CXXSTDHEADER_tr1_cinttypes 1
          151  +	#define CXXO_CXXSTDHEADER_tr1_random 1
          152  +	#define CXXO_CXXSTDHEADER_tr1_tuple 1
          153  +	#define CXXO_CXXSTDHEADER_tr1_type_traits 1
          154  +#endif
          155  +
          156  +#if (CXXOFLAG_tr1  && CXXOMFORT_CXX_EMULATION < 2011)
          157  +	#define CXXOFLAG_namespace_tr1 1
          158  +	#undef  CXXO_STDTR1_NAME
          159  +	#define CXXO_STDTR1_NAME() std::tr1
          160  +	#undef  CXXO_STDTR1_OPEN
          161  +	#define CXXO_STDTR1_OPEN() namespace std { namespace tr1 {
          162  +	#undef  CXXO_STDTR1_CLOSE
          163  +	#define CXXO_STDTR1_CLOSE() } }
          164  +	#if (defined(CXXOMFORT_NOTICES) && CXXOMFORT_NOTICES > 1)
          165  +		#pragma message CXXO_NOTICE ("namespace tr1")
          166  +	#endif
          167  +
   138    168   #endif
   139    169   
   140    170   // 
   141    171   // features per version
   142    172   // 
   143    173   
   144    174   #if (CXXOMFORT_COMPILER_VERSION >= 403)
................................................................................
   203    233   #endif
   204    234   #if (CXXOMFORT_COMPILER_VERSION >= 406)
   205    235       #if (CXXOMFORT_CXX_STD< 2011) && (CXXOMFORT_CXX_EMULATION>=2011)
   206    236           #undef  CXXO_COMPILER_SUPPORT_alignof
   207    237           #define CXXO_COMPILER_SUPPORT_alignof 1
   208    238           #undef  CXXO_COMPILER_SUPPORT_auto
   209    239           #define CXXO_COMPILER_SUPPORT_auto 1
   210         -        #undef  CXXO_COMPILER_SUPPORT_cstd_cstdint
   211         -        #define CXXO_COMPILER_SUPPORT_cstd_cstdint 1
   212         -        #undef  CXXO_COMPILER_SUPPORT_cstd_system_error
   213         -        #define CXXO_COMPILER_SUPPORT_cstd_system_error 1
          240  +        #undef  CXXO_CXXSTDHEADER_cstdint
          241  +        #define CXXO_CXXSTDHEADER_cstdint 1
          242  +        #undef  CXXO_CXXSTDHEADER_system_error
          243  +        #define CXXO_CXXSTDHEADER_system_error 1
   214    244           #undef  CXXO_COMPILER_SUPPORT_charn_t
   215    245           #define CXXO_COMPILER_SUPPORT_charn_t 2 // defined as their own types
   216    246           #undef  CXXO_COMPILER_SUPPORT_common_type
   217    247           #define CXXO_COMPILER_SUPPORT_common_type 1
   218    248           #undef  CXXO_COMPILER_SUPPORT_conditional_enableif 
   219    249           #define CXXO_COMPILER_SUPPORT_conditional_enableif 1
   220    250           #undef  CXXO_COMPILER_SUPPORT_default_delete
................................................................................
   307    337           #undef  CXXO_COMPILER_SUPPORT_std_voidt
   308    338           #define CXXO_COMPILER_SUPPORT_std_voidt 1
   309    339       #endif
   310    340   #endif
   311    341   
   312    342   // detect lack of a <cuchar> header
   313    343   #if (CXXOMFORT_COMPILER_VERSION < 600)
   314         -    #undef  CXXO_COMPILER_SUPPORT_cstd_cuchar
   315         -    #define CXXO_COMPILER_SUPPORT_cstd_cuchar 0
          344  +    #undef  CXXO_CXXSTDHEADER_cuchar
          345  +    #define CXXO_CXXSTDHEADER_cuchar 0
   316    346   #endif
   317    347   
   318    348   #endif

Changes to cxxomfort/cxxomfort/config/msc.hpp.

     5      5   #define CXXOMFORT_CONFIG_MSC_HPP
     6      6   
     7      7   /*
     8      8    * 
     9      9    * MSVC version history
    10     10    * 
    11     11    * 14.0 / 2015 (2015-07). Generates telemetry!
    12         - * 12.0 / 2013 (2013-10) **to be tested**
    13         - * 11.0 / 2012 (2012-08) **preferred, Windows 7**
    14         - * 10.0 / 2010 (2010-04)
    15         - * 9.0 / 2008 (2007-11) **preferred**
           12  + * 12.0 / 2013 (2013-10) - _MSC_VER==1800; **to be tested**
           13  + * 11.0 / 2012 (2012-08) - _MSC_VER==1700; **preferred, Windows 7**
           14  + * 10.0 / 2010 (2010-04) - _MSC_VER==1600;
           15  + * 9.0 / 2008 (2007-11) - _MSC_VER==1500; **preferred**
    16     16    * 8.0 (2005-11)
    17     17    * 
    18     18    * 
    19     19    * In VC < 10, there is no such thing as C++11 emulation mode. What's more
    20     20    * important, in some versions the implementation of TR1 is broken or, in the
    21     21    * case of VC9 Express (2008) it won't install at all. 
    22     22    * Meaning that to be usable, this library needs to implement many
................................................................................
    42     42   #define CXXOMFORT_COMPILER_ID CXXO_COMPILERID_MSC
    43     43   #define CXXOMFORT_COMPILER_VERSION (_MSC_VER)
    44     44   #define CXXOMFORT_COMPILER_VERSION_FULL (_MSC_FULL_VER)
    45     45   // eg.: 120 for VC6 (ugh!), 150 for VC9 (Studio / Express 2008)
    46     46   
    47     47   #define CXXO_PRAGMA(x) _Pragma (#x)
    48     48   
           49  +#undef CXXO_NOTICE
           50  +#define CXXO_NOTICE(msg) (msg)
    49     51   #if defined(CXXOMFORT_NOTICES)
    50     52       #pragma message CXXO_NOTICE("Found the Microsoft C++ Compiler [" CXXO_STRINGIZE(_MSC_VER) "]" )
    51     53   #endif
    52     54   
    53     55   #if (CXXOMFORT_CXX_STD < 100)
    54     56   	#undef CXXOMFORT_CXX_STD
    55     57   	#define CXXOMFORT_CXX_STD (__cplusplus/100)
................................................................................
    75     77   // At least VC2005
    76     78   #if (CXXOMFORT_COMPILER_VERSION > 1300)
    77     79   #endif
    78     80   
    79     81   
    80     82   #if (CXXOMFORT_COMPILER_VERSION >= 1500) // VC 2008 or higher
    81     83       #if (_MSC_FULL_VER == 150030729) // SP1
    82         -        #undef  CXXOMFORT_COMPILER_VERSION
    83         -        #define CXXOMFORT_COMPILER_VERSION 1501
           84  +
           85  +		#undef  CXXOFLAG_tr1
           86  +		#define CXXOFLAG_tr1 1
           87  +
           88  +		#undef  CXXO_CXXSTDHEADER_array
           89  +		#define CXXO_CXXSTDHEADER_array 1
           90  +		#undef  CXXO_CXXSTDHEADER_random
           91  +		#define CXXO_CXXSTDHEADER_random 1
           92  +		#undef  CXXO_CXXSTDHEADER_type_traits
           93  +		#define CXXO_CXXSTDHEADER_type_traits 1
           94  +		
    84     95   		#undef  CXXO_COMPILER_SUPPORT_tr1_array 
    85     96   		#define CXXO_COMPILER_SUPPORT_tr1_array 1
    86     97   		#undef  CXXO_COMPILER_SUPPORT_tr1_tuple 
    87     98   		#define CXXO_COMPILER_SUPPORT_tr1_tuple 1
    88     99   		#undef  CXXO_COMPILER_SUPPORT_tr1_type_traits
    89    100   		#define CXXO_COMPILER_SUPPORT_tr1_type_traits 1
          101  +
          102  +		#define CXXOFLAG_namespace_tr1 1
          103  +		#undef  CXXO_STDTR1_NAME
          104  +		#define CXXO_STDTR1_NAME() std::tr1
          105  +		#undef  CXXO_STDTR1_OPEN
          106  +		#define CXXO_STDTR1_OPEN() namespace std { namespace tr1 {
          107  +		#undef  CXXO_STDTR1_CLOSE
          108  +		#define CXXO_STDTR1_CLOSE() } }
          109  +		#if (defined(CXXOMFORT_NOTICES) && CXXOMFORT_NOTICES > 1)
          110  +			#pragma message CXXO_NOTICE ("namespace tr1")
          111  +		#endif
          112  +
    90    113       #endif
    91    114       #undef  CXXO_COMPILER_SUPPORT_type_intrinsics
    92    115       #define CXXO_COMPILER_SUPPORT_type_intrinsics 1
    93    116       #undef  CXXO_COMPILER_SUPPORT_va_args
    94    117       #define CXXO_COMPILER_SUPPORT_va_args 1
    95    118       
    96    119   #endif
................................................................................
   101    124           #undef  CXXOMFORT_COMPILER_VERSION
   102    125           #define CXXOMFORT_COMPILER_VERSION 1601
   103    126       #endif
   104    127       #undef  CXXOMFORT_CXX_EMULATION
   105    128       #define CXXOMFORT_CXX_EMULATION 2011
   106    129       #undef  CXXO_COMPILER_SUPPORT__Pragma
   107    130       #define CXXO_COMPILER_SUPPORT__Pragma 1
   108         -    #undef  CXXO_COMPILER_SUPPORT_cstd_system_error
   109         -    #define CXXO_COMPILER_SUPPORT_cstd_system_error 1
          131  +
          132  +    #undef  CXXO_CXXSTDHEADER_array
          133  +    #define CXXO_CXXSTDHEADER_array 1
          134  +    #undef  CXXO_CXXSTDHEADER_random
          135  +    #define CXXO_CXXSTDHEADER_random 1
          136  +    #undef  CXXO_CXXSTDHEADER_system_error
          137  +    #define CXXO_CXXSTDHEADER_system_error 1
          138  +    #undef  CXXO_CXXSTDHEADER_typeindex
          139  +    #define CXXO_CXXSTDHEADER_typeindex 1
          140  +    #undef  CXXO_CXXSTDHEADER_tuple
          141  +    #define CXXO_CXXSTDHEADER_tuple 1
          142  +
   110    143       #undef  CXXO_COMPILER_SUPPORT_auto
   111    144       #define CXXO_COMPILER_SUPPORT_auto 1984
   112    145       #undef  CXXO_COMPILER_SUPPORT_charn_t
   113    146       #define CXXO_COMPILER_SUPPORT_charn_t 2 // char16_t as typedef in yvals.h
   114    147       #undef  CXXO_COMPILER_SUPPORT_charn_t_IS_TYPEDEF
   115    148       #define CXXO_COMPILER_SUPPORT_charn_t_IS_TYPEDEF 1
   116    149       #undef  CXXO_COMPILER_SUPPORT_conditional_enableif
................................................................................
   136    169       #undef  CXXO_COMPILER_SUPPORT_std_metaprogramming_helpers
   137    170       #define CXXO_COMPILER_SUPPORT_std_metaprogramming_helpers 1
   138    171       #undef  CXXO_COMPILER_SUPPORT_trailing_returns
   139    172       #define CXXO_COMPILER_SUPPORT_trailing_returns 1
   140    173       #undef  CXXO_COMPILER_SUPPORT_unique_ptr
   141    174       #define CXXO_COMPILER_SUPPORT_unique_ptr 1
   142    175   
          176  +	#define CXXOFLAG_namespace_tr1 0
          177  +	#undef  CXXO_STDTR1_NAME
          178  +	#define CXXO_STDTR1_NAME() std
          179  +	#undef  CXXO_STDTR1_OPEN
          180  +	#define CXXO_STDTR1_OPEN() namespace std {
          181  +	#undef  CXXO_STDTR1_CLOSE
          182  +	#define CXXO_STDTR1_CLOSE() } 
   143    183       
   144    184   #endif
   145    185   
   146    186   // -- TODO -- get my claws on a MSVC 2012 / 2013 for actual testing
   147    187   // -- NEW TODO -- get my claws on the MSVC 2013 and CTP
   148    188   
   149    189   #if (CXXOMFORT_COMPILER_VERSION >= 1700) // At least VC 2012
   150         -    #undef  CXXO_COMPILER_SUPPORT_cstd_cstdint 
   151         -    #define CXXO_COMPILER_SUPPORT_cstd_cstdint 1
   152         -    #undef  CXXO_COMPILER_SUPPORT_cstd_typeindex
   153         -    #define CXXO_COMPILER_SUPPORT_cstd_typeindex 1
          190  +	#undef  CXXOFLAG_tr1
          191  +	#define CXXOFLAG_tr1 1
          192  +
          193  +    #undef  CXXO_CXXSTDHEADER_cstdint 
          194  +    #define CXXO_CXXSTDHEADER_cstdint 1
          195  +    #undef  CXXO_CXXSTDHEADER_typeindex
          196  +    #define CXXO_CXXSTDHEADER_typeindex 1
          197  +
   154    198       #undef  CXXO_COMPILER_SUPPORT_common_type
   155    199       #define CXXO_COMPILER_SUPPORT_common_type 1
   156    200       #undef  CXXO_COMPILER_SUPPORT_enum_class
   157    201       #define CXXO_COMPILER_SUPPORT_enum_class 1
   158    202       #undef  CXXO_COMPILER_SUPPORT_foreach
   159    203       #define CXXO_COMPILER_SUPPORT_foreach 1
   160    204       #undef  CXXO_COMPILER_SUPPORT_std_common_type
................................................................................
   162    206       #undef  CXXO_COMPILER_SUPPORT_std_is_trivially
   163    207       #define CXXO_COMPILER_SUPPORT_std_is_trivially 1
   164    208       #undef  CXXO_COMPILER_SUPPORT_std_is_constructible_traits
   165    209       #define CXXO_COMPILER_SUPPORT_std_is_constructible_traits 1
   166    210   #endif
   167    211   
   168    212   // At least VC2013
   169         -#if (CXXOMFORT_COMPILER_VERSION >= 1800) // At least VC 2012
          213  +#if (CXXOMFORT_COMPILER_VERSION >= 1800) 
   170    214   	#undef  CXXO_COMPILER_SUPPORT_functional_transparent
   171    215   	#define CXXO_COMPILER_SUPPORT_functional_transparent 1
   172    216   #endif
   173    217   
   174    218   // At least VC2015
   175    219   #if (CXXOMFORT_COMPILER_VERSION >= 1900) // At least VC 2015
   176    220       #undef  CXXO_COMPILER_SUPPORT_alignment_tools

Changes to cxxomfort/cxxomfort/config/ow.hpp.

    80     80   // integer types are available in native cstdint
    81     81   
    82     82   // explicit cast... do templates work?
    83     83   
    84     84   #endif // 9999
    85     85   
    86     86   #if (__WATCOMC__ >= 1200) // Watcom 1.9 or higher
    87         -    #undef  CXXO_COMPILER_SUPPORT_cstd_cstdint
    88         -    #define CXXO_COMPILER_SUPPORT_cstd_cstdint 1
           87  +    #undef  CXXO_CXXSTDHEADER_cstdint
           88  +    #define CXXO_CXXSTDHEADER_cstdint 1
    89     89   
    90     90   #endif
    91     91   
    92     92   #if (__WATCOMC__ >= 1300) // Watcom 2.0 / OpenWatcom or higher
    93     93   #endif
    94     94   
    95     95   #endif

Changes to cxxomfort/cxxomfort/functional.hpp.

    12     12   #include <cxxomfort/base.hpp>
    13     13   #include CXXO_INCLUDE_SYS(functional)
    14     14   
    15     15   #if (defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1))
    16     16       #pragma message CXXO_NOTICE("enabled <functional> support.")
    17     17   #endif
    18     18   
    19         -#if (CXXOFLAG_namespace_tr1>0)
    20         -#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
    21         -	#include <tr1/functional>
           19  +#if (CXXOMFORT_CXX_STD >= 2011)
           20  +
           21  +#elif (CXXOMFORT_CXX_STD < 2011 && CXXOFLAG_tr1>0)
           22  +	// GCC has TR1 files under tr1/ and symbols under std::tr1::
           23  +	#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
           24  +		#include <tr1/functional>
           25  +
    22     26   namespace std {
    23     27       namespace placeholders { using namespace ::std::tr1::placeholders; };
    24     28       using tr1::reference_wrapper;
    25     29       using tr1::ref;
    26     30       using tr1::cref;
    27     31       using tr1::hash;
    28     32       using tr1::bind;
    29     33       using tr1::function;
    30     34       using tr1::bad_function_call;
    31     35       // using tr1::hash;
    32     36   }
    33         -#elif (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,<1600))
           37  +
           38  +	#elif (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,>=1600) )
           39  +	// MSC 2010 and ahead don't have a tr1
           40  +	#elif (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,<1600) && CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,>=1500) )
           41  +	// MSC 2008 has tr1 under includepath, symbols under tr1::
    34     42   namespace std {
    35     43   	using tr1::reference_wrapper;
    36     44   	using tr1::ref;
    37     45   	using tr1::cref;
    38     46   	using tr1::mem_fn;
    39     47   	using tr1::bind;
    40     48   	using tr1::function;
    41     49       using tr1::bad_function_call;
    42     50       using tr1::hash;
    43     51   }
    44         -#endif // compiler
    45         -#endif // tr1
           52  +	#else
           53  +	// MSC 2005 doesn't have a TR1
           54  +		#if defined(CXXOFLAG_USE_INTERNAL_TR1)
           55  +		#endif
           56  +
           57  +	#endif // compiler
           58  +#else
           59  +	// before support for TR1
           60  +	#if defined(CXXOFLAG_USE_INTERNAL_TR1)
           61  +		#include "./impl/07-reference_wrapper.hpp"
           62  +		#include "./impl/07-hash.hpp"
           63  +	#endif
           64  +#endif // c++ pre-11, tr1
           65  +
    46     66   
    47     67   namespace cxxomfort {
    48     68   namespace cxxostd {
    49     69   
    50     70   // 
    51     71   // std::invoke (C++11-onward only)
    52     72   //

Deleted cxxomfort/cxxomfort/impl/03-array.hpp.

     1         -#ifndef CXXOMFORT_IMPL_03_STD_ARRAY_HPP
     2         -#define CXXOMFORT_IMPL_03_STD_ARRAY_HPP
     3         -/**
     4         - * @file
     5         - * 
     6         - * This file is intended to be included only in circumstances where 
     7         - * cxxomfort detects there is not an <array> or <tr1/array> available 
     8         - * (detection which has yet to be implemented via CXXOFLAG_NO_TR1 )
     9         - */
    10         -#include <cxxomfort/base.hpp>
    11         -#include <cxxomfort/impl/relationals.hpp>
    12         -#include CXXO_INCLUDE_SYS(iterator)
    13         -#include CXXO_INCLUDE_SYS(algorithm)
    14         -#define CXXOMFORT_IMPLEMENTS_n1479 CXXO_IMPLSTATUS_BACKPORT()
    15         -#define CXXOMFORT_IMPLEMENTS_std_array CXXOMFORT_IMPLEMENTS_n1479
    16         -
    17         -namespace cxxomfort {
    18         -namespace cxxostd {
    19         -namespace array {
    20         -
    21         -namespace detail {
    22         -    template <typename T>
    23         -    struct add_pointer {
    24         -        typedef T* type;
    25         -    };
    26         -    
    27         -} // detail
    28         -
    29         -/**
    30         - * An implementation of C++11's <code>std::array</code> 
    31         - * for compilers in C++03 mode that lack TR1.
    32         - * 
    33         - * Main differences with usual TR1 array:
    34         - * 
    35         - * * does not implement <code>array.at</code>.
    36         - * * does not implement cbegin, cend, crbegin, crend.
    37         - * 
    38         - * @sa https://wg21.link/n1479
    39         - * 
    40         - */
    41         -template <typename T, size_t N>
    42         -struct array {
    43         -    static_assert (N , "array<T,N> with N>0");
    44         -    
    45         -    typedef T value_type;
    46         -    typedef T const           const_value_type;
    47         -    enum{ const_size = N};
    48         -
    49         -    typedef size_t            size_type;
    50         -    typedef ptrdiff_t         difference_type;
    51         -
    52         -    typedef typename detail::add_pointer<T>::type    pointer;
    53         -    typedef typename detail::add_pointer<const_value_type>::type const_pointer;
    54         -    
    55         -    typedef T&           reference;
    56         -    typedef T const&     const_reference;
    57         -    
    58         -    typedef pointer           iterator;
    59         -    typedef const_pointer     const_iterator;
    60         -    typedef typename std::reverse_iterator<iterator>::type reverse_iterator;
    61         -    typedef typename std::reverse_iterator<const_iterator>::type const_reverse_iterator;
    62         -    
    63         -    
    64         -    pointer         data () CXXO_NOEXCEPTNOTHROW { return elems; }
    65         -    const_pointer   data () const CXXO_NOEXCEPTNOTHROW { return elems; }
    66         -    size_t     size () const CXXO_NOEXCEPTNOTHROW { return N; }
    67         -    size_t     max_size () const CXXO_NOEXCEPTNOTHROW { return N; }
    68         -    bool       empty () const CXXO_NOEXCEPTNOTHROW { return false; }
    69         -    
    70         -    reference       front () CXXO_NOEXCEPTNOTHROW { return elems[0]; }
    71         -    const_reference front () const CXXO_NOEXCEPTNOTHROW { return elems[0]; }
    72         -    reference       back () CXXO_NOEXCEPTNOTHROW { return elems[N-1]; }
    73         -    const_reference back () const CXXO_NOEXCEPTNOTHROW { return elems[N-1]; }
    74         -    
    75         -
    76         -    reference       operator[] (size_t i) CXXO_NOEXCEPTNOTHROW { return elems[i]; }
    77         -    const_reference operator[] (size_t i) const CXXO_NOEXCEPTNOTHROW { return elems[i]; }
    78         -    
    79         -    iterator        begin () CXXO_NOEXCEPT { return elems; }
    80         -    const_iterator  begin () const CXXO_NOEXCEPT { return elems; }
    81         -    iterator        end () CXXO_NOEXCEPT { return elems+N; }
    82         -    const_iterator  end () const CXXO_NOEXCEPT { return elems+N; }
    83         -    
    84         -    void fill (T const& t) {
    85         -        std::fill(this->begin(), this->end(), t);
    86         -    }
    87         -    
    88         -    friend bool operator== (array const& a1, array const& a2) {
    89         -        return std::equal(a1.begin(), a1.end(), a2.begin());
    90         -    }
    91         -    friend bool operator< (array const& a1, array const& a2) {
    92         -        return std::lexicographical_compare(a1.begin(), a1.end(), a2.begin());
    93         -    }
    94         -
    95         -    private:
    96         -    T elems[N];
    97         -};
    98         -
    99         -#define TARGS T,N
   100         -#define TPARAMS typename T, size_t N
   101         -CXXO_GENERATE_RELATIONALS_T(array);
   102         -#undef TARGS
   103         -#undef TPARAMS
   104         -
   105         -template <typename T, size_t N>
   106         -void swap (array<T,N>& li, array<T,N>& lr) {
   107         -    for (size_t i=0; i < N; ++i) { using std::swap; swap(li.elems[i], lr.elems[i]); }
   108         -}
   109         -
   110         -template <size_t I, typename T, size_t N>
   111         -T& get (array<T,N>& a) CXXO_NOEXCEPTNOTHROW {
   112         -    static_assert(I<N, "invalid get<> in array");
   113         -    return a[I];
   114         -}
   115         -
   116         -template <size_t I, typename T, size_t N>
   117         -T const& get (array<T,N> const& a) CXXO_NOEXCEPTNOTHROW {
   118         -    static_assert(I<N, "invalid get<> in array");
   119         -    return a[I];
   120         -}
   121         -
   122         -
   123         -} // array
   124         -} }
   125         -
   126         -
   127         -
   128         -#endif

Changes to cxxomfort/cxxomfort/impl/03-random_renames.hpp.

     2      2   #define CXXOMFORT_IMPL_RANDOM_RENAMES_HPP
     3      3   /**
     4      4    * @file
     5      5    * @brief Provides C++11-compliant renames of some utilities in C++03 TR1's "random" that changed names.
     6      6    */
     7      7   
     8      8   #include "../base.hpp"
     9         -#include <random>
    10         -//#include CXXO_INCLUDE_SYS(random)
            9  +//#include CXXO_INCLUDE_SYS(random) // should already be done at this point
    11     10   
    12     11   // fix renamed functors in <random> between C++03 TR1 and C++11
    13     12   #if ((CXXOMFORT_CXX_STD < 2011) && (CXXOMFORT_CXX_EMULATION < 2011))
    14     13   namespace std { namespace tr1 { 
    15     14   // These are only "good enough to work" fixes.
    16     15   
    17     16   

Added cxxomfort/cxxomfort/impl/07-array.hpp.

            1  +#ifndef CXXOMFORT_IMPL_03_STD_ARRAY_HPP
            2  +#define CXXOMFORT_IMPL_03_STD_ARRAY_HPP
            3  +/**
            4  + * @file
            5  + * 
            6  + * This file is intended to be included only in circumstances where 
            7  + * cxxomfort detects there is not an <array> or <tr1/array> available 
            8  + * (detection which has yet to be implemented via CXXOFLAG_NO_TR1 )
            9  + */
           10  +#include <cxxomfort/base.hpp>
           11  +#include <cxxomfort/impl/relationals.hpp>
           12  +#include CXXO_INCLUDE_SYS(iterator)
           13  +#include CXXO_INCLUDE_SYS(algorithm)
           14  +#define CXXOMFORT_IMPLEMENTS_n1479 CXXO_IMPLSTATUS_BACKPORT()
           15  +#define CXXOMFORT_IMPLEMENTS_std_array CXXOMFORT_IMPLEMENTS_n1479
           16  +
           17  +namespace cxxomfort {
           18  +namespace cxxostd {
           19  +namespace array {
           20  +
           21  +namespace detail {
           22  +    template <typename T>
           23  +    struct add_pointer {
           24  +        typedef T* type;
           25  +    };
           26  +    
           27  +} // detail
           28  +
           29  +/**
           30  + * An implementation of C++11's <code>std::array</code> 
           31  + * for compilers in C++03 mode that lack TR1.
           32  + * 
           33  + * Main differences with usual TR1 array:
           34  + * 
           35  + * * does not implement <code>array.at</code>.
           36  + * * does not implement cbegin, cend, crbegin, crend.
           37  + * 
           38  + * @sa https://wg21.link/n1479
           39  + * 
           40  + */
           41  +template <typename T, size_t N>
           42  +struct array {
           43  +    static_assert (N , "array<T,N> with N>0");
           44  +    
           45  +    typedef T value_type;
           46  +    typedef T const           const_value_type;
           47  +    enum{ const_size = N};
           48  +
           49  +    typedef size_t            size_type;
           50  +    typedef ptrdiff_t         difference_type;
           51  +
           52  +    typedef typename detail::add_pointer<T>::type    pointer;
           53  +    typedef typename detail::add_pointer<const_value_type>::type const_pointer;
           54  +    
           55  +    typedef T&           reference;
           56  +    typedef T const&     const_reference;
           57  +    
           58  +    typedef pointer           iterator;
           59  +    typedef const_pointer     const_iterator;
           60  +    typedef typename std::reverse_iterator<iterator>::type reverse_iterator;
           61  +    typedef typename std::reverse_iterator<const_iterator>::type const_reverse_iterator;
           62  +    
           63  +    
           64  +    pointer         data () CXXO_NOEXCEPTNOTHROW { return elems; }
           65  +    const_pointer   data () const CXXO_NOEXCEPTNOTHROW { return elems; }
           66  +    size_t     size () const CXXO_NOEXCEPTNOTHROW { return N; }
           67  +    size_t     max_size () const CXXO_NOEXCEPTNOTHROW { return N; }
           68  +    bool       empty () const CXXO_NOEXCEPTNOTHROW { return false; }
           69  +    
           70  +    reference       front () CXXO_NOEXCEPTNOTHROW { return elems[0]; }
           71  +    const_reference front () const CXXO_NOEXCEPTNOTHROW { return elems[0]; }
           72  +    reference       back () CXXO_NOEXCEPTNOTHROW { return elems[N-1]; }
           73  +    const_reference back () const CXXO_NOEXCEPTNOTHROW { return elems[N-1]; }
           74  +    
           75  +
           76  +    reference       operator[] (size_t i) CXXO_NOEXCEPTNOTHROW { return elems[i]; }
           77  +    const_reference operator[] (size_t i) const CXXO_NOEXCEPTNOTHROW { return elems[i]; }
           78  +    
           79  +    iterator        begin () CXXO_NOEXCEPT { return elems; }
           80  +    const_iterator  begin () const CXXO_NOEXCEPT { return elems; }
           81  +    iterator        end () CXXO_NOEXCEPT { return elems+N; }
           82  +    const_iterator  end () const CXXO_NOEXCEPT { return elems+N; }
           83  +    
           84  +    void fill (T const& t) {
           85  +        std::fill(this->begin(), this->end(), t);
           86  +    }
           87  +    
           88  +    friend bool operator== (array const& a1, array const& a2) {
           89  +        return std::equal(a1.begin(), a1.end(), a2.begin());
           90  +    }
           91  +    friend bool operator< (array const& a1, array const& a2) {
           92  +        return std::lexicographical_compare(a1.begin(), a1.end(), a2.begin());
           93  +    }
           94  +
           95  +    private:
           96  +    T elems[N];
           97  +};
           98  +
           99  +#define TARGS T,N
          100  +#define TPARAMS typename T, size_t N
          101  +CXXO_GENERATE_RELATIONALS_T(array);
          102  +#undef TARGS
          103  +#undef TPARAMS
          104  +
          105  +template <typename T, size_t N>
          106  +void swap (array<T,N>& li, array<T,N>& lr) {
          107  +    for (size_t i=0; i < N; ++i) { using std::swap; swap(li.elems[i], lr.elems[i]); }
          108  +}
          109  +
          110  +template <size_t I, typename T, size_t N>
          111  +T& get (array<T,N>& a) CXXO_NOEXCEPTNOTHROW {
          112  +    static_assert(I<N, "invalid get<> in array");
          113  +    return a[I];
          114  +}
          115  +
          116  +template <size_t I, typename T, size_t N>
          117  +T const& get (array<T,N> const& a) CXXO_NOEXCEPTNOTHROW {
          118  +    static_assert(I<N, "invalid get<> in array");
          119  +    return a[I];
          120  +}
          121  +
          122  +
          123  +} // array
          124  +} }
          125  +
          126  +
          127  +
          128  +#endif

Added cxxomfort/cxxomfort/impl/07-hash.hpp.

            1  +#ifndef CXXOMFORT_IMPL_03_HASH_HPP
            2  +#define CXXOMFORT_IMPL_03_HASH_HPP
            3  +
            4  +
            5  +#include <cxxomfort/config.hpp>
            6  +
            7  +#if (CXXOFLAG_tr1==0 || CXXOMFORT_CXX_STD < 2011)
            8  +/* 
            9  + * Note: 
           10  + * We declare hash in namespace std:: , since 
           11  + * users have to be able to specialize it.
           12  + * */
           13  +
           14  +namespace std {
           15  +
           16  +template <typename t> struct hash {};
           17  +
           18  +#define CXXO_HASH_NATIVE(T) \
           19  +template <> struct hash< T > { \
           20  +	typedef T argument_type; \
           21  +	typedef size_t result_type; \
           22  +	result_type operator() (T x) const CXXO_NOEXCEPTNOTHROW { \
           23  +		return static_cast<result_type>(x); \
           24  +	} \
           25  + \
           26  +} \
           27  +
           28  +CXXO_HASH_NATIVE(bool);
           29  +CXXO_HASH_NATIVE(char);
           30  +CXXO_HASH_NATIVE(signed char);
           31  +CXXO_HASH_NATIVE(unsigned char);
           32  +CXXO_HASH_NATIVE(signed int);
           33  +CXXO_HASH_NATIVE(unsigned int);
           34  +CXXO_HASH_NATIVE(signed short);
           35  +CXXO_HASH_NATIVE(unsigned short);
           36  +CXXO_HASH_NATIVE(signed long);
           37  +CXXO_HASH_NATIVE(unsigned long);
           38  +CXXO_HASH_NATIVE(signed long long);
           39  +CXXO_HASH_NATIVE(unsigned long long);
           40  +CXXO_HASH_NATIVE(float);
           41  +CXXO_HASH_NATIVE(double);
           42  +CXXO_HASH_NATIVE(wchar_t);
           43  +
           44  +
           45  +#undef CXXO_HASH_NATIVE
           46  +
           47  +
           48  +// hash for pointer types
           49  +
           50  +template <typename T>
           51  +struct hash <T*> {
           52  +	typedef T* argument_type; 
           53  +	typedef size_t result_type; 
           54  +	result_type operator() (T* x) const CXXO_NOEXCEPTNOTHROW { 
           55  +		return (static_cast<const char*>(x) - static_cast<const char*>(0));
           56  +	} 
           57  +};
           58  +
           59  +
           60  +}
           61  +
           62  +#endif // std
           63  +
           64  +#endif

Added cxxomfort/cxxomfort/impl/07-reference_wrapper.hpp.

            1  +#ifndef CXXOMFORT_IMPL_REFERENCE_WRAPPER_HPP
            2  +#define CXXOMFORT_IMPL_REFERENCE_WRAPPER_HPP
            3  +/**
            4  + * @file
            5  + *
            6  + */
            7  +
            8  +#include "../config.hpp"
            9  +#include "11-addressof.hpp"
           10  +#define CXXOMFORT_IMPLEMENTS_n1436 CXXO_IMPLSTATUS_BACKPORT()
           11  +#define CXXOMFORT_IMPLEMENTS_n1453 CXXO_IMPLSTATUS_BACKPORT()
           12  +#define CXXOMFORT_IMPLEMENTS_reference_wrapper CXXOMFORT_IMPLEMENTS_n1453
           13  +
           14  +namespace cxxomfort {
           15  +namespace cxxostd {
           16  +
           17  +/**
           18  + * @brief reference_wrapper from C++11.
           19  + * @anchor reference_wrapper
           20  + */
           21  +template <typename T>
           22  +struct reference_wrapper {
           23  +    public:
           24  +    typedef T value_type;
           25  +    explicit reference_wrapper(T& t) CXXO_NOEXCEPT 
           26  +    : v(std::addressof(t)) {}
           27  +
           28  +    // the copy-ctor and assignment are trivial in C++11
           29  +	#if (CXXOMFORT_CXX_STD >= 2011)
           30  +	constexpr reference_wrapper (reference_wrapper const& ) noexcept = default;
           31  +	reference_wrapper& operator= (reference_wrapper const&) noexcept = default;
           32  +    reference_wrapper(T&&) = delete;
           33  +	#else
           34  +	reference_wrapper (reference_wrapper const& R) CXXO_NOEXCEPTNOTHROW
           35  +	: :v(R.get()){} 
           36  +    reference_wrapper& operator= (reference_wrapper const& R) CXXO_NOEXCEPTNOTHROW {
           37  +        v= R.v;
           38  +        return *this;
           39  +    }
           40  +	#endif
           41  +
           42  +    #if (CXXOMFORT_CXX_STD>=2011)
           43  +    #endif
           44  +
           45  +
           46  +    T& get () const CXXO_NOEXCEPTNOTHROW { return v; }
           47  +    operator T& () const CXXO_NOEXCEPTNOTHROW { return v; }
           48  +
           49  +    #if (CXXOMFORT_CXX_STD>=2011)
           50  +    template< class... ArgTypes >
           51  +    typename std::result_of<T&(ArgTypes&&...)>::type
           52  +    operator() ( ArgTypes&&... args ) const; {
           53  +        return get()(std::forward<ArgTypes>(args)...);
           54  +    }
           55  +    #elif (CXXO_COMPILER_SUPPORT_typeof)
           56  +    __typeof__( std::declval<T>() ) 
           57  +    operator() () const {
           58  +        return get()();
           59  +    }
           60  +    template <typename T1>
           61  +    __typeof__( std::declval<T>()(std::declval<T1>()) )
           62  +    operator() (T1 const& a1) const {
           63  +        return get()(a1);
           64  +    }
           65  +    template <typename T1, typename T2>
           66  +    __typeof__( std::declval<T>()(std::declval<T1>(), std::declval<T2>() ) )
           67  +    operator() (T1 const& a1, T2 const& a2) const {
           68  +        return get()(a1,a2);
           69  +    }
           70  +    #endif
           71  +    
           72  +    private:
           73  +    T* v;
           74  +};
           75  +
           76  +template <typename T>
           77  +reference_wrapper<T> ref (T& t) CXXO_NOEXCEPTNOTHROW {
           78  +    return reference_wrapper<T>(t);
           79  +}
           80  +
           81  +template <typename T>
           82  +reference_wrapper<T const> cref (T const& t) CXXO_NOEXCEPTNOTHROW {
           83  +    return reference_wrapper<T const>(t);
           84  +}
           85  +
           86  +
           87  +} }
           88  +
           89  +#endif // file

Changes to cxxomfort/cxxomfort/impl/17-make_from_tuple.hpp.

     3      3   /**
     4      4    * @file
     5      5    * @brief Implementation of std::make_from_tuple
     6      6    */
     7      7   
     8      8   #include <cxxomfort/base.hpp>
     9      9   #include <cxxomfort/tuple.hpp> // index_sequence
    10         -#include <tuple> // ...duh
    11     10   
    12         -#if (CXXOMFORT_CXX_STD>=2011)
           11  +#if (CXXOMFORT_CXX_STD >= 2017)
           12  +#define CXXOMFORT_IMPLEMENTS_p0209 CXXO_IMPLSTATUS_NATIVE()
           13  +#elf (CXXOMFORT_CXX_STD >= 2011)
    13     14   #define CXXOMFORT_IMPLEMENTS_p0209 CXXO_IMPLSTATUS_BACKPORT()
    14     15   #else
    15     16   #define CXXOMFORT_IMPLEMENTS_p0209 CXXO_IMPLSTATUS_EMULATION()
    16     17   #endif
           18  +
    17     19   #define CXXOMFORT_IMPLEMENTS_make_from_tuple CXXOMFORT_IMPLEMENTS_p0209 
    18     20   
    19     21   namespace cxxomfort {
    20     22   namespace cxxostd {
    21     23   
    22     24   // 
    23     25   // make_from_tuple

Changes to cxxomfort/cxxomfort/impl/errc-posix.hpp.

    71     71   text_file_busy =ETXTBSY,
    72     72   timed_out =ETIMEDOUT,
    73     73   too_many_files_open_in_system =ENFILE,
    74     74   too_many_files_open =EMFILE,
    75     75   too_many_links =EMLINK,
    76     76   too_many_symbolic_link_levels =ELOOP,
    77     77   value_too_large =EOVERFLOW,
    78         -wrong_protocol_type =EPROTOTYPE 
    79         -
           78  +wrong_protocol_type =EPROTOTYPE ,
    80     79   

Added cxxomfort/cxxomfort/impl/errc.hpp.

            1  +#ifndef CXXOMFORT_IMPL_ERRC_HPP
            2  +#define CXXOMFORT_IMPL_ERRC_HPP
            3  +
            4  +#include <cxxomfort/cerrno.hpp>
            5  +#include <cxxomfort/impl/typesafe_enum-core.hpp>
            6  +
            7  +namespace cxxomfort { namespace cxxostd {
            8  +
            9  +//
           10  +// errc and helpers
           11  +//
           12  +
           13  +struct myerrc{ enum type { 
           14  +
           15  +#if 0
           16  +#elif defined(_POSIX_VERSION)
           17  +    #include "../impl/errc-posix.hpp"
           18  +#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_OW)
           19  +    #include "../impl/errc-win.hpp"
           20  +#else
           21  +    // #error "Can not find definitions for std::errc codes."
           22  +#endif
           23  +
           24  +};  };
           25  +
           26  +
           27  +/**
           28  + * @brief Enumerated type that saves the various POSIX error values
           29  + * @see https://en.cppreference.com/w/cpp/error/errc
           30  + */
           31  +typedef cxxomfort::impl::typesafe_enum<myerrc,int> errc;
           32  +
           33  +template <typename T> struct is_error_code_enum 
           34  +: public std::false_type {};
           35  +
           36  +template<> struct is_error_code_enum <errc> : public std::true_type {};
           37  +// Here we need to specialize for myerrc::type as well
           38  +// because the constructors for error_condition and error_code below 
           39  +// use SFINAE to match the exact type, before conversion.
           40  +template<> struct is_error_code_enum<myerrc::type> : public std::true_type {};
           41  +
           42  +
           43  +} } // namespace
           44  +
           45  +#endif

Changes to cxxomfort/cxxomfort/impl/n3334-array_ref.hpp.

     5      5    *  
     6      6   **/
     7      7   
     8      8   #include <cxxomfort/base.hpp>
     9      9   #include <iterator>
    10     10   #include <stdexcept>
    11     11   #include <valarray> // maybe do away with this
           12  +#include <cxxomfort/cerrno.hpp>
           13  +#include <cxxomfort/system_error.hpp> // see way to get rid of this
    12     14   #include <cxxomfort/array.hpp> // maybe do away with this
    13     15   #include <cxxomfort/impl/metaprogramming.hpp>
    14     16   #include <cxxomfort/type_traits.hpp>
    15         -#include <cxxomfort/system_error.hpp> // see way to get rid of this
    16     17   
    17     18   #define CXXOMFORT_IMPLEMENTS_n3334 CXXO_IMPLSTATUS_LIBRARY()
    18     19   #define CXXOMFORT_IMPLEMENTS_array_ref CXXOMFORT_IMPLEMENTS_n3334
    19     20   
    20     21   #if (defined(CXXOMFORT_NOTICES) && CXXOMFORT_NOTICES>1)
    21     22       #pragma message CXXO_NOTICE("enabled library: array_ref<T> implementation")
    22     23   #endif

Changes to cxxomfort/cxxomfort/random.hpp.

     9      9   
    10     10   #include "config.hpp"
    11     11   #include "base.hpp"
    12     12   #include <limits>
    13     13   #include <ctime>
    14     14   #include <cxxomfort/array.hpp>
    15     15   
    16         -#if (CXXOMFORT_CXX_STD>=1997)
    17     16   
    18         -#include <random>
           17  +#if (CXXOMFORT_CXX_STD >= 2011)
           18  +	#include <random>
    19     19   
    20         -// #include <type_traits>
    21         -#if (defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1))
    22         -#pragma message CXXO_NOTICE("enabled <random> support.")
    23         -#endif
           20  +#elif (CXXOMFORT_CXX_STD>=1997 && CXXOMFORT_CXX_STD < 2011 && CXXOFLAG_tr1)
           21  +	// C++03 with TR1
           22  +	#if (defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1))
           23  +		#pragma message CXXO_NOTICE("enabled <random> support.")
           24  +	#endif
    24     25   
           26  +	#if (CXXOFLAG_directory_tr1>0)
           27  +		#include <tr1/random>
           28  +	#else 
           29  +		#include <random>
           30  +	#endif
           31  +
           32  +
           33  +// 
    25     34   // Fixes for the C++03 names of utilities in <random>
    26         -#include "impl/03-random_renames.hpp"
           35  +// 
    27     36   
    28         -#if (CXXOFLAG_namespace_tr1>0 ) \
    29         -|| (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,<1600))
           37  +	#include "impl/03-random_renames.hpp"
           38  +
           39  +	#if (CXXOFLAG_namespace_tr1>0 ) \
           40  +	|| (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,<1600))
    30     41   namespace std {
    31     42       using tr1::linear_congruential_engine;
    32     43       using tr1::minstd_rand;
    33     44       using tr1::minstd_rand0;
    34     45       
    35     46       using tr1::mersenne_twister;
    36     47       using tr1::mt19937;
................................................................................
    43     54       using tr1::uniform_int_distribution;
    44     55       using tr1::uniform_real_distribution;
    45     56   
    46     57       
    47     58       using tr1::random_device;
    48     59   }
    49     60   
    50         -#endif
           61  +	#endif
    51     62   
    52     63   
    53     64   // TBA: Backport discrete_distribution to c++03
    54     65   
    55     66   // C++03 approach to random_device
    56     67   // #include "impl/11-random_device.hpp"
    57     68   
    58         -namespace cxxomfort {
    59         -namespace cxxostd {
           69  +namespace cxxomfort { namespace cxxostd {
    60     70   
    61     71   /**
    62     72    * @brief An adapter that caches and returns results from a generator in a random-ish order.
    63     73    * @ingroup cxx11-backports
    64     74    * @xrefitem std0random "" ""
    65     75    * @anchor shuffle_order_engine
    66     76    * 
................................................................................
   135    145   /*
   136    146    * Visual C++ 2010 has a broken shuffle_order_engine that calls the 
   137    147    * nonmember min, max of the attached Engine, whereas the same 
   138    148    * engines that VC has only have member functions. Here we try to 
   139    149    * replace it with our own.
   140    150    * 
   141    151    * */
   142         -#if (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC, >= 1600) && CXXOMFORT_CXX_STD< 2011 && CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC, < 1700))
   143         -    using ::cxxomfort::cxxostd::shuffle_order_engine;
   144         -    using ::cxxomfort::cxxostd::knuth_b;
   145         -#else
   146         -    using cxxostd::shuffle_order_engine;
   147         -    using cxxostd::knuth_b;
   148         -#endif
          152  +	#if (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC, >= 1600) && CXXOMFORT_CXX_STD< 2011 && CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC, < 1700))
          153  +		using ::cxxomfort::cxxostd::shuffle_order_engine;
          154  +		using ::cxxomfort::cxxostd::knuth_b;
          155  +	#else
          156  +		using cxxostd::shuffle_order_engine;
          157  +		using cxxostd::knuth_b;
          158  +	#endif
   149    159   
   150    160   #ifdef DOXYGEN_DOC
   151    161   /**
   152    162    * @brief Forwarder for @c std::shuffle_order_engine
   153    163    * @ingroup cxxomfort-fix
   154    164    * @xrefitem cxxomfort-fix "<random>" "shuffle_order_engine"
   155    165    * 

Changes to cxxomfort/cxxomfort/system_error.hpp.

    21     21    * namespace also called errc, making it impossible to 
    22     22    * declare variables of type std::errc.
    23     23    * 
    24     24    * Because of this, in the case of MSVC 2010 specifically, 
    25     25    * we probably should be overriding the native <system_error> in config/msc.hpp
    26     26    * 
    27     27    * */
    28         -#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC && defined(_SYSTEM_ERROR_) && !defined(CXXO_MSVC_PATCH_system_error))
    29         -//    #error "oopsie! Patch <system_error> or add cxxomfort/config/msc/ to include path"
    30         -#endif
    31     28   
    32         -#if (CXXO_COMPILER_SUPPORT_cstd_system_error>0)
           29  +#if (CXXO_CXXSTDHEADER_system_error>0)
    33     30       #include CXXO_INCLUDE_SYS(system_error)
    34     31       #define CXXOMFORT_IMPLEMENTS_header_system_error CXXO_IMPLSTATUS_NATIVE()
    35     32   #else
    36     33   
    37     34   
    38     35   #include <cxxomfort/base.hpp>
    39     36   #include <cxxomfort/base/explicit_cast.hpp>
    40         -#include "library/typesafe_enum.hpp"
           37  +#include <cxxomfort/cerrno.hpp>
    41     38   #include "impl/relationals.hpp"
    42     39   #include "impl/11-addressof.hpp"
    43     40   #include "impl/11-to_string.hpp"
    44     41   #include <stdexcept>
    45     42   #include <string>
    46     43   #include <cstring> // strerror
    47         -#include <cerrno>
    48     44   #include <utility> // make_pair, operator<
    49     45   
    50     46   #if ((CXXOMFORT_CXX_STD < 2011))
    51         -// start code for implementation of system_error
           47  +	// start code for implementation of system_error
    52     48   
    53         -#define CXXOMFORT_IMPLEMENTS_header_system_error CXXO_IMPLSTATUS_EMULATION()
           49  +	#include "library/typesafe_enum.hpp"
           50  +	#include "impl/errc.hpp"
    54     51   
    55         -#if (CXXOMFORT_COMPILER_ID == CXXO_COMPILERID_MSC)
    56         -    #pragma warning (disable:4996) // MSVC: function may be unsafe
    57         -#endif
           52  +	#define CXXOMFORT_IMPLEMENTS_header_system_error CXXO_IMPLSTATUS_EMULATION()
    58     53   
    59         -#if defined(__linux__) || defined(__unix__)
    60         -    #include <unistd.h> // POSIX
    61         -#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_OW)
    62         -    #include <errno.h>
    63         -    #include "impl/errno-msvc.hpp"
    64         -#endif
           54  +	#if (CXXOMFORT_COMPILER_ID == CXXO_COMPILERID_MSC)
           55  +		#pragma warning (disable:4996) // MSVC: function may be unsafe
           56  +	#endif
           57  +
           58  +	#if defined(__linux__) || defined(__unix__)
           59  +		#include <unistd.h> // POSIX
           60  +	#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_OW)
           61  +		#include <errno.h>
           62  +		//#include "impl/errno-msvc.hpp"
           63  +	#endif
    65     64   
    66     65   namespace cxxomfort {
    67     66   namespace cxxostd {
    68     67   
    69     68   class error_code;
    70     69   
    71         -//
    72         -// errc and helpers
    73         -//
    74         -
    75         -struct myerrc{ enum type { 
    76         -
    77         -#if 0
    78         -#elif defined(_POSIX_VERSION)
    79         -    #include "impl/errc-posix.hpp"
    80         -#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_OW)
    81         -    #include "impl/errc-win.hpp"
    82         -#else
    83         -    #error "Can not find definitions for std::errc codes."
    84         -#endif
    85         -
    86         -};  };
    87         -
    88         -
    89         -/**
    90         - * @brief Enumerated type that saves the various POSIX error values
    91         - * @see https://en.cppreference.com/w/cpp/error/errc
    92         - */
    93         -typedef cxxomfort::library::typesafe_enum<myerrc,int> errc;
    94         -
    95         -template <typename T> struct is_error_code_enum 
    96         -: public std::false_type {};
    97         -
    98         -template<> struct is_error_code_enum <errc> : public std::true_type {};
    99         -// Here we need to specialize for myerrc::type as well
   100         -// because the constructors for error_condition and error_code below 
   101         -// use SFINAE to match the exact type, before conversion.
   102         -template<> struct is_error_code_enum<myerrc::type> : public std::true_type {};
   103         -
   104     70   
   105     71   //
   106     72   // error_condition and helpers
   107     73   //
   108     74   
   109     75   class error_condition;
   110     76   
................................................................................
   265    231           p_category= &generic_category();
   266    232       }
   267    233       
   268    234       int        value () const CXXO_NOEXCEPTNOTHROW { return v_error; }
   269    235       error_category const& category () const CXXO_NOEXCEPTNOTHROW { return *p_category; }
   270    236       std::string message () const;
   271    237       
   272         -    CXXO_EXPLICIT_OPERATOR(bool) () const CXXO_NOEXCEPT { return v_error; }
          238  +    CXXO_EXPLICIT_OPERATOR(bool) () const CXXO_NOEXCEPT { return !!v_error; }
   273    239   
   274    240       friend bool operator== (error_condition const& l, error_condition const& r) CXXO_NOEXCEPTNOTHROW {
   275    241           return (l.p_category == r.p_category && l.v_error == r.v_error);
   276    242       }
   277    243       friend bool operator< (error_condition const& l, error_condition const& r) CXXO_NOEXCEPTNOTHROW {
   278    244           return std::make_pair(l.p_category, l.v_error) < std::make_pair(r.p_category, r.v_error);
   279    245       }
................................................................................
   343    309       // Checks if the error value is set.
   344    310       // operator bool () const { return value() != 0; }
   345    311       
   346    312       error_condition default_error_condition () const CXXO_NOEXCEPTNOTHROW {
   347    313           return category().default_error_condition(value());
   348    314       }
   349    315   
   350         -    CXXO_EXPLICIT_OPERATOR(bool) () const CXXO_NOEXCEPTNOTHROW { return value(); }
          316  +    CXXO_EXPLICIT_OPERATOR(bool) () const CXXO_NOEXCEPTNOTHROW { return !!value(); }
   351    317       
   352    318       // comparison operators
   353    319       
   354    320       friend bool operator== (error_code const& vl, error_code const& vr) CXXO_NOEXCEPTNOTHROW {
   355    321           return vl.category()==vr.category() && vl.value()==vr.value();
   356    322       }
   357    323       friend bool operator<  (error_code const& vl, error_code const& vr) CXXO_NOEXCEPTNOTHROW {
................................................................................
   465    431   #endif // c++11
   466    432   
   467    433   
   468    434   #if (defined(CXXOFLAG_NO_STD_USING) && CXXOFLAG_NO_STD_USING>0 )
   469    435   #else
   470    436   
   471    437       #if (CXXOMFORT_CXX_STD>=2011)
   472         -    #elif (CXXO_COMPILER_SUPPORT_cstd_system_error>0)
          438  +    #elif (CXXO_CXXSTDHEADER_system_error>0)
   473    439       #else
   474    440           
   475    441           
   476    442   namespace std {
   477    443       
   478    444       using cxxomfort::cxxostd::errc;
   479    445       using cxxomfort::cxxostd::make_error_code;
................................................................................
   526    492   
   527    493   /**
   528    494    * @brief Creates a value of type @c errc given a numeric error code.
   529    495    * @ingroup cxxomfort-fix
   530    496    * 
   531    497    * */
   532    498   static inline errc to_errc(int E) {
   533         -#if (CXXO_COMPILER_SUPPORT_cstd_system_error==0)
          499  +#if (CXXO_CXXSTDHEADER_system_error==0)
   534    500       return static_cast<cxxomfort::cxxostd::myerrc::type>(E);
   535    501   #else
   536    502       return static_cast<errc>(E);
   537    503   #endif
   538    504   }
   539    505   
   540    506   } } // cxxomfort::fix

Changes to cxxomfort/cxxomfort/type_traits.hpp.

   586    586   : public remove_cv < typename remove_reference<T>::type > 
   587    587   {
   588    588   };
   589    589   
   590    590   } // std
   591    591   
   592    592   #else // CXX_STD < 1997
   593         -	#include <cxxomfort/util/type_traits.hpp>
          593  +
          594  +	#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_OW)
          595  +		#include <cxxomfort/config/ow/type_traits>
          596  +	#endif
   594    597   
          598  +	#include <cxxomfort/util/type_traits.hpp>
          599  +	
   595    600   namespace std {
   596    601   	using namespace cxxomfort::traits;
   597    602   }
   598    603   
   599    604   
   600    605   #endif // CXX_STD >= 1997
   601    606   

Changes to cxxomfort/cxxomfort/util/type_traits.hpp.

    46     46    *
    47     47    */
    48     48   
    49     49   #include "../config.hpp"
    50     50   #include "../base/nullptr.hpp"
    51     51   //#include <cstddef>
    52     52   //#include "meta.hpp"
           53  +
           54  +#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_OW)
           55  +	#include <cxxomfort/config/ow/type_traits>
           56  +#endif
    53     57   
    54     58   namespace cxxomfort {
    55     59   namespace traits {
    56     60   
    57     61   namespace helper {
    58     62   
    59     63       template <bool Cond, typename T1, typename T2> struct conditional        { typedef T2 type; };
................................................................................
   523    527   
   524    528   
   525    529   /*
   526    530    * The traits starting at this point are intended 
   527    531    * to require compiler support, so we rely on intrinsics
   528    532    */
   529    533   
          534  +// for the following compilers, we just return false unless otherwise specified
          535  +
          536  +#if (CXXOMFORT_CXX_STD >= 1997)
          537  +
   530    538   // is_class
   531    539   template <typename T> struct is_class
   532    540   : helper::conditional< __is_class(T), true_type, false_type>::type {};
   533    541   
   534    542   // is_empty
   535    543   template <typename T> struct is_empty 
   536    544   : helper::conditional< __is_empty(T), true_type, false_type>::type {};
................................................................................
   557    565   : helper::conditional< __is_polymorphic(T), true_type, false_type>::type {};
   558    566   
   559    567   // is_pod
   560    568   template <typename T> struct is_pod
   561    569   : helper::conditional< __is_pod(T), true_type, false_type>::type {};
   562    570   
   563    571   
          572  +#else
          573  +
          574  +template <typename T>
          575  +struct is_enum { enum { value = __is_enum(T) }; };
          576  +
          577  +template <typename T>
          578  +struct is_union { enum { value = __is_union(T) }; };
          579  +
          580  +template <typename T>
          581  +struct is_class { enum { value = __is_class(T) }; };
          582  +
          583  +template <typename T>
          584  +struct is_pod { enum { value = is_arithmetic<T>::value  }; };
          585  +
          586  +#endif
          587  +
   564    588   
   565    589   /*
   566    590    * Advanced type properties
   567    591    */
   568    592   
   569    593   // given the above, it should be possible to 
   570    594   // implement is_scalar.