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

Overview
Comment:Commit 2019-02-13 - Love-- for OpenWatcom; various minor fixes.
  • cxxomfort: Updated CHANGELOG.txt which missed out an update.
  • cxxomfort: Initial compatibility testings for MSVC 2005 compatibility (has no TR1).
  • config: CXXO_INCLUDE_SYS notices got demoted to notice level 3.
  • config: Added basic detection of MSVC 2005 (still not supported).
  • base: Base feature implementation notices got demoted to notice level 4.
  • cstddef: Reimplemented std::byte, with better compatibility for C++<97.
  • cstddef: Added std::byte support for MSVC 2005.
  • array: Added support for MSVC 2005.
  • system_error: Fixed forwarding of @ref cxxomfort::fix::errc for MSVC 2012.
  • type_traits: Added support for the "primary" traits in MSVC 2005.
  • library:algorithm: Add p1223 find_backward().
  • library:algorithm: Add p1223r0 find_not().
  • library:algorithm: Add lwg217 find() (binary predicate form).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | gcc_max_505 | msvc_max_1700 | y2019 | gcc_min_404 | msvc_min_1500 | openwatcom_min_109 | testing
Files: files | file ages | folders
SHA3-256:0ad1617a0965788c43dffcd1e6372541a0f24f598dfa7340643c21307bac5244
User & Date: luismachuca 2019-02-14 03:15:53
Context
2019-02-14
03:17
(no comment) check-in: 26454986 user: luismachuca tags: trunk, gcc_max_505, msvc_max_1700, y2019, gcc_min_404, msvc_min_1500, openwatcom_min_109, testing
03:15
Commit 2019-02-13 - Love-- for OpenWatcom; various minor fixes.
  • cxxomfort: Updated CHANGELOG.txt which missed out an update.
  • cxxomfort: Initial compatibility testings for MSVC 2005 compatibility (has no TR1).
  • config: CXXO_INCLUDE_SYS notices got demoted to notice level 3.
  • config: Added basic detection of MSVC 2005 (still not supported).
  • base: Base feature implementation notices got demoted to notice level 4.
  • cstddef: Reimplemented std::byte, with better compatibility for C++<97.
  • cstddef: Added std::byte support for MSVC 2005.
  • array: Added support for MSVC 2005.
  • system_error: Fixed forwarding of @ref cxxomfort::fix::errc for MSVC 2012.
  • type_traits: Added support for the "primary" traits in MSVC 2005.
  • library:algorithm: Add p1223 find_backward().
  • library:algorithm: Add p1223r0 find_not().
  • library:algorithm: Add lwg217 find() (binary predicate form).
check-in: 0ad1617a user: luismachuca tags: trunk, gcc_max_505, msvc_max_1700, y2019, gcc_min_404, msvc_min_1500, openwatcom_min_109, testing
2019-02-03
23:21
Commit 2019-02-04 - Barebones implementations for C++<1997, and some compatibility fixes.
  • cxxomfort: Fixed identification of OpenWatcom 1.9, 2.0 (Per-Compiler Notes).
  • cxxomfort: Added a separate header for code generation macros.
  • array: Added barbeones feature for Watcom (Per-Compiler Notes).
  • cstddef: Pending extend backport of std::byte.
  • functional: Fixed transparent functors detected in MSVC 2013.
  • random: Disabled temporarily in C++<1997 mode.
  • string: Added operator<< for Watcom.
  • string_view: Reimplemented for C++<1997 mode.
  • string_view: Fixed ostream operator for C++<1997, basic_ostream<char> only.
  • system_error: Disabled in <1997 mode.
  • tuple: Disabled in <1997 mode (Per-Compiler Notes).
  • library: Disabled temporarily in <1997 mode (Per-Compiler Notes).
check-in: d5f10c30 user: luismachuca tags: trunk, gcc_max_505, msvc_max_1700, pre-release, y2019, clang_max_303
Changes

Changes to cxxomfort/CHANGELOG.txt.


































1
2
3
4
5
6
7

































Commit 2019-02-01 - All these fixes have some traits in std::common.

  *  cxxomfort: Fixed detection of Clang 3.x, 4.x and features.
  *  cxxomfort: Fixed detection of namespace tr1 in Clang C++03 mode, STDLIB mode.
  *  cxxomfort: Fixed to_byte missing cxxomfort::fix.
  *  cxxomfort: Improved documentation.
  *  config: Fixed the definition of CXXO_TYPEOF and scenarios.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Commit 2019-02-13 - <tt>Love--</tt> for OpenWatcom; various minor fixes.

  *  cxxomfort: Updated CHANGELOG.txt which missed out an update.
  *  cxxomfort: Initial compatibility testings for MSVC 2005 compatibility (has no TR1).
  *  config: <tt>CXXO_INCLUDE_SYS</tt> notices got demoted to notice level 3.
  *  config: Added basic detection of MSVC 2005 (still not supported).
  *  base: Base feature implementation notices got demoted to notice level 4.
  *  cstddef: Reimplemented <tt>std::byte</tt>, with better compatibility for C++<97.
  *  cstddef: Added <tt>std::byte</tt> support for MSVC 2005.
  *  array: Added support for MSVC 2005.
  *  system_error: Fixed forwarding of @ref <tt>cxxomfort::fix::errc</tt> for MSVC 2012.
  *  type_traits: Added support for the "primary" traits in MSVC 2005.
  *  library:algorithm: Add p1223 <tt>find_backward()</tt>.
  *  library:algorithm: Add p1223r0 <tt>find_not()</tt>.
  *  library:algorithm: Add lwg217 <tt>find()</tt> (binary predicate form).


Commit 2019-02-04 - Barebones implementations for C++<1997, and some compatibility fixes.

  *  cxxomfort: Fixed identification of OpenWatcom 1.9, 2.0 ([Per-Compiler Notes]).
  *  cxxomfort: Added a separate header for code generation macros.
  *  array: Added barbeones feature for Watcom ([Per-Compiler Notes]).
  *  cstddef: Pending extend backport of std::byte.
  *  functional: Fixed transparent functors detected in MSVC 2013.
  *  random: Disabled temporarily in C++<1997 mode.
  *  string: Added operator<< for Watcom.
  *  string_view: Reimplemented for C++<1997 mode.
  *  string_view: Fixed ostream operator for C++<1997, basic_ostream<char> only.
  *  system_error: Disabled in <1997 mode.
  *  tuple: Disabled in <1997 mode ([Per-Compiler Notes]).
  *  library: Disabled temporarily in <1997 mode ([Per-Compiler Notes]).


Commit 2019-02-01 - All these fixes have some traits in std::common.

  *  cxxomfort: Fixed detection of Clang 3.x, 4.x and features.
  *  cxxomfort: Fixed detection of namespace tr1 in Clang C++03 mode, STDLIB mode.
  *  cxxomfort: Fixed to_byte missing cxxomfort::fix.
  *  cxxomfort: Improved documentation.
  *  config: Fixed the definition of CXXO_TYPEOF and scenarios.

Changes to cxxomfort/cxxomfort/array.hpp.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *
 */

#include <cxxomfort/config.hpp>
#include <cxxomfort/base.hpp>


#if (CXXOMFORT_CXX_STD<1997)
#include "impl/03-array.hpp"

namespace std {
	using ::cxxomfort::cxxostd::array::array;
}

#elif (CXXOMFORT_CXX_STD < 2011)







|







5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *
 */

#include <cxxomfort/config.hpp>
#include <cxxomfort/base.hpp>


#if (CXXOMFORT_CXX_STD<1997 || CXXO_COMPILER_SUPPORT_tr1_array==0)
#include "impl/03-array.hpp"

namespace std {
	using ::cxxomfort::cxxostd::array::array;
}

#elif (CXXOMFORT_CXX_STD < 2011)

Changes to cxxomfort/cxxomfort/base/alignof.hpp.

9
10
11
12
13
14
15




















16
17
18
19
20
21
22
..
24
25
26
27
28
29
30

31



32
33
34
35
36

#if (CXXOMFORT_CXX_STD < 2011 || CXXO_COMPILER_SUPPORT_alignof==0)
    #define CXXOMFORT_USING_alignof
#endif


#if defined(CXXOMFORT_USING_alignof) || defined(DOXYGEN_DOC)





















/* alignof */
    #ifdef alignof
    #error " cxxomfort - conflicting #define directive for 'alignof()'!"
    #endif

/**
................................................................................
 * @brief Provides <code>alignof(x)</code> in platforms lacking the directive.
 * @ingroup cxx11-backports
 * @note This definition relies on the existence of an existing intrinsic 
 * <code>__alignof</code> that would have similar semantics.
 * 
 * Related utilities: @c alignas , @c aligned_storage .
 * */

    #define alignof(x) __alignof( x )




#endif // using emulation


#endif // file







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>

>
>
>





9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
..
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

#if (CXXOMFORT_CXX_STD < 2011 || CXXO_COMPILER_SUPPORT_alignof==0)
    #define CXXOMFORT_USING_alignof
#endif


#if defined(CXXOMFORT_USING_alignof) || defined(DOXYGEN_DOC)

// from https://stackoverflow.com/questions/364483/determining-the-alignment-of-c-c-structures-in-relation-to-its-members

namespace cxxomfort { namespace cxxostd {

template <typename T>
struct alignof_impl {
	private:
	struct helper {
		char _;
		T t;
	};
	public:
	enum { value = sizeof(helper)-sizeof(T) };
	
};



} }

/* alignof */
    #ifdef alignof
    #error " cxxomfort - conflicting #define directive for 'alignof()'!"
    #endif

/**
................................................................................
 * @brief Provides <code>alignof(x)</code> in platforms lacking the directive.
 * @ingroup cxx11-backports
 * @note This definition relies on the existence of an existing intrinsic 
 * <code>__alignof</code> that would have similar semantics.
 * 
 * Related utilities: @c alignas , @c aligned_storage .
 * */
#if (CXXOMFORT_CXX_STD>=1997)
    #define alignof(x) __alignof( x )
#else
	#define alignof(x) (cxxomfort::cxxostd::alignof_impl<x>::value)
#endif

#endif // using emulation


#endif // file

Changes to cxxomfort/cxxomfort/base/static_assert.hpp.

43
44
45
46
47
48
49


50
51
52
53
54
55
56
 * @param msg The string literal to provide as a compiler error message if the assertion does not hold
 * @see https://en.cppreference.com/w/cpp/language/static_assert
 * 
 */
//    #define static_assert(test,msg) enum { CXXO_JOIN(sassert_e_,__COUNTER__) = (int)(msg[0])/(test) }
    #if defined(_MSC_VER)
    #define static_assert(test,msg) typedef void* CXXO_JOIN(sassert_expr_,__COUNTER__)[(test)?1:-1]


    #else
    #define static_assert(test,msg) enum { CXXO_JOIN(sassert_e_,__COUNTER__) = 1/(test) }
    #endif

    #define CXXOMFORT_IMPLEMENTS_n1381 CXXO_IMPLSTATUS_EMULATION()

#else 







>
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 * @param msg The string literal to provide as a compiler error message if the assertion does not hold
 * @see https://en.cppreference.com/w/cpp/language/static_assert
 * 
 */
//    #define static_assert(test,msg) enum { CXXO_JOIN(sassert_e_,__COUNTER__) = (int)(msg[0])/(test) }
    #if defined(_MSC_VER)
    #define static_assert(test,msg) typedef void* CXXO_JOIN(sassert_expr_,__COUNTER__)[(test)?1:-1]
    #elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_OW)
    #define static_assert(test,msg) enum { CXXO_JOIN(sassert_expr_,__LINE__) = 1 /(test) }
    #else
    #define static_assert(test,msg) enum { CXXO_JOIN(sassert_e_,__COUNTER__) = 1/(test) }
    #endif

    #define CXXOMFORT_IMPLEMENTS_n1381 CXXO_IMPLSTATUS_EMULATION()

#else 

Changes to cxxomfort/cxxomfort/config.hpp.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
 * @author Luis Machuca Bezzaza
 *
 * This file contains configuration macros used by the cxxomfort library
 * and it is not intended to be directly used.
 */

//! Library version and release date as YYYYMMDD
#define CXXOMFORT_DATE 20190201UL
//! Defines the library version (WARNING: to be deprecated)
#define CXXOMFORT_VERSION 89

#include "config/_version.hpp" // (WARNING: to be deprecated)
#include "config/_pre.hpp"

//
// Standard Mode
//

#include "config/_support.hpp"


/*
 * Behaviour macros
 */

................................................................................


#define CXXO_INCLUDE_SYS(NAME) <NAME>


#define CXXO_COMPILERVERSION_COMPARE(com_,ver_) ((CXXOMFORT_COMPILER_ID == com_ && CXXOMFORT_COMPILER_VERSION ver_))

#define CXXO_NOTICE_IMPL_(msg) (msg)

//! Emits a notice at compilation time.
#define CXXO_NOTICE(msg) CXXO_NOTICE_IMPL_(  __FILE__ "(" CXXO_STRINGIZE1(__LINE__) ") : cxxomfort notice: " msg)
//! Emits a warning at compilation time.
#define CXXO_WARNING(msg) CXXO_NOTICE_IMPL_( __FILE__ "(" CXXO_STRINGIZE1(__LINE__) ") : cxxomfort warning: " msg)


................................................................................
    #if defined(CXXOMFORT_NOTICES)
        #pragma message CXXO_WARNING("Found an undetermined compiler.")
    #endif
#endif

#if (defined(CXXOMFORT_NOTICES))
    #pragma message ("compiler found : " \
    CXXO_STRINGIZE1(CXXOMFORT_COMPILER_ID) "." \
    CXXO_STRINGIZE1(CXXOMFORT_COMPILER_VERSION) ) 
    #pragma message ("library mode   : ver=" \
    CXXO_STRINGIZE1(CXXOMFORT_DATE) " std=" \
    CXXO_STRINGIZE1(CXXOMFORT_CXX_STD) ",emu=" \
    CXXO_STRINGIZE1(CXXOMFORT_CXX_EMULATION) )

/*
 * Set up more friendly messages
 */
    #if (CXXOMFORT_NOTICES > 1)

................................................................................
/* 
 * CXXO_TYPEOF
 * 
 * */
#if (CXXOMFORT_CXX_STD>=2011 || CXXO_COMPILER_SUPPORT_decltype)
	#undef  CXXO_TYPEOF
	#define CXXO_TYPEOF(...) decltype(__VA_ARGS__)
#elif (CXXO_COMPILER_SUPPORT_typeof)
	#undef  CXXO_TYPEOF
	#define CXXO_TYPEOF(...) __typeof__(__VA_ARGS__)
#else
	// a shot in the dark?
	#undef  CXXO_TYPEOF
	#define CXXO_TYPEOF(expr) cxxo_typeof_not_available_t 
#endif


//
// ---------------------------------------------------------
//







|

|

|


<
<
<
<







 







|







 







|


|
|







 







|


|

<







5
6
7
8
9
10
11
12
13
14
15
16
17
18




19
20
21
22
23
24
25
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
339
340
341
342
343
344
345
346
347
348
349
350

351
352
353
354
355
356
357
 * @author Luis Machuca Bezzaza
 *
 * This file contains configuration macros used by the cxxomfort library
 * and it is not intended to be directly used.
 */

//! Library version and release date as YYYYMMDD
#define CXXOMFORT_DATE 20190204UL
//! Defines the library version (WARNING: to be deprecated)
#define CXXOMFORT_VERSION 91

//#include "config/_version.hpp" // (WARNING: to be deprecated)
#include "config/_pre.hpp"





#include "config/_support.hpp"


/*
 * Behaviour macros
 */

................................................................................


#define CXXO_INCLUDE_SYS(NAME) <NAME>


#define CXXO_COMPILERVERSION_COMPARE(com_,ver_) ((CXXOMFORT_COMPILER_ID == com_ && CXXOMFORT_COMPILER_VERSION ver_))

#define CXXO_NOTICE_IMPL_(msg) msg

//! Emits a notice at compilation time.
#define CXXO_NOTICE(msg) CXXO_NOTICE_IMPL_(  __FILE__ "(" CXXO_STRINGIZE1(__LINE__) ") : cxxomfort notice: " msg)
//! Emits a warning at compilation time.
#define CXXO_WARNING(msg) CXXO_NOTICE_IMPL_( __FILE__ "(" CXXO_STRINGIZE1(__LINE__) ") : cxxomfort warning: " msg)


................................................................................
    #if defined(CXXOMFORT_NOTICES)
        #pragma message CXXO_WARNING("Found an undetermined compiler.")
    #endif
#endif

#if (defined(CXXOMFORT_NOTICES))
    #pragma message ("compiler found : " \
    CXXO_STRINGIZE1(CXXOMFORT_COMPILER_ID) ":" \
    CXXO_STRINGIZE1(CXXOMFORT_COMPILER_VERSION) ) 
    #pragma message ("library mode   : ver=" \
    CXXO_STRINGIZE1(CXXOMFORT_DATE) " mode=" \
    CXXO_STRINGIZE1(CXXOMFORT_CXX_STD) ":" \
    CXXO_STRINGIZE1(CXXOMFORT_CXX_EMULATION) )

/*
 * Set up more friendly messages
 */
    #if (CXXOMFORT_NOTICES > 1)

................................................................................
/* 
 * CXXO_TYPEOF
 * 
 * */
#if (CXXOMFORT_CXX_STD>=2011 || CXXO_COMPILER_SUPPORT_decltype)
	#undef  CXXO_TYPEOF
	#define CXXO_TYPEOF(...) decltype(__VA_ARGS__)
#elif (CXXO_COMPILER_SUPPORT_typeof && !defined(CXXO_TYPEOF))
	#undef  CXXO_TYPEOF
	#define CXXO_TYPEOF(...) __typeof__(__VA_ARGS__)
#elif (!defined(CXXO_TYPEOF))
	// a shot in the dark?

	#define CXXO_TYPEOF(expr) cxxo_typeof_not_available_t 
#endif


//
// ---------------------------------------------------------
//

Changes to cxxomfort/cxxomfort/config/_codegen.hpp.

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 * @param ... Explicit constructor body (for C++03)
 * */
#if (CXXOMFORT_CXX_STD>=2011 || CXXO_COMPILER_SUPPORT_default_delete)
    #define CXXO_DEFAULT_COPY_CONSTRUCTOR(Type, Su, ...) \
    Type (Type const& ) Su = default 
#else 
    #define CXXO_DEFAULT_COPY_CONSTRUCTOR(Type, Su, ...) \
    Type (Type const& v) Su \
    : __VA_ARGS__ {} 
#endif


/**
 * @def CXXO_DELETED_COPY_CONSTRUCTOR
 * @ingroup cxxomfort-codegen







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 * @param ... Explicit constructor body (for C++03)
 * */
#if (CXXOMFORT_CXX_STD>=2011 || CXXO_COMPILER_SUPPORT_default_delete)
    #define CXXO_DEFAULT_COPY_CONSTRUCTOR(Type, Su, ...) \
    Type (Type const& ) Su = default 
#else 
    #define CXXO_DEFAULT_COPY_CONSTRUCTOR(Type, Su, ...) \
    Type (Type const& From) Su \
    : __VA_ARGS__ {} 
#endif


/**
 * @def CXXO_DELETED_COPY_CONSTRUCTOR
 * @ingroup cxxomfort-codegen

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

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
 * GCC headers tend to be organized via a 
 * path with subfolders {bits,tr1}
 */
#undef  CXXO_INCLUDE_SYS
#define CXXO_INCLUDE_SYS(name) <bits/../tr1/../name>
#if defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1)
    #pragma message( CXXO_WARNING("Using bits/../tr1/../<version> include paths"))
#endif

// 
// general support found in GCC
// 









|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
 * GCC headers tend to be organized via a 
 * path with subfolders {bits,tr1}
 */
#undef  CXXO_INCLUDE_SYS
#define CXXO_INCLUDE_SYS(name) <bits/../tr1/../name>
#if defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1)
    #pragma message( CXXO_NOTICE("Using bits/../tr1/../<version> include paths"))
#endif

// 
// general support found in GCC
// 


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

52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69
70
71






72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/**
 * MSVC headers tend to be organized via a 
 * path like ${VISUAL_STUDIO}/VC/include
 */
#undef  CXXO_INCLUDE_SYS
#define CXXO_INCLUDE_SYS(NAME) <../../VC/include/NAME>
#if defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1)
    #pragma message( CXXO_WARNING("Using Windows+MSC include paths"))

#endif


// At least VC2005
#if (CXXOMFORT_COMPILER_VERSION > 1200)
#endif


#if (CXXOMFORT_COMPILER_VERSION >= 1500) // VC 2008 or higher
    #if (_MSC_FULL_VER == 150030729)
        #undef  CXXOMFORT_COMPILER_VERSION
        #define CXXOMFORT_COMPILER_VERSION 1501






    #endif
    #undef  CXXO_COMPILER_SUPPORT_compiler_intrinsics_is_x
    #define CXXO_COMPILER_SUPPORT_compiler_intrinsics_is_x 1
    #undef  CXXO_COMPILER_SUPPORT_va_args
    #define CXXO_COMPILER_SUPPORT_va_args 1
    #undef  CXXO_COMPILER_SUPPORT_tr1_tuple 
    #define CXXO_COMPILER_SUPPORT_tr1_tuple 1
    #undef  CXXO_COMPILER_SUPPORT_tr1_type_traits
    #define CXXO_COMPILER_SUPPORT_tr1_type_traits 1
    
#endif

// At least VC2010
#if (CXXOMFORT_COMPILER_VERSION >= 1600) // VC10 or higher
    #if (_MSC_FULL_VER == 160040219) // SP1
        #undef  CXXOMFORT_COMPILER_VERSION
................................................................................
    #undef  CXXO_COMPILER_SUPPORT_unique_ptr
    #define CXXO_COMPILER_SUPPORT_unique_ptr 1

    
#endif

// -- TODO -- get my claws on a MSVC 2012 / 2013 for actual testing
// -- NEW TODO -- get my claws on the MSVC 2013 and CRTP.

#if (CXXOMFORT_COMPILER_VERSION >= 1700) // At least VC 2012
    #undef  CXXO_COMPILER_SUPPORT_cstd_cstdint 
    #define CXXO_COMPILER_SUPPORT_cstd_cstdint 1
    #undef  CXXO_COMPILER_SUPPORT_cstd_typeindex
    #define CXXO_COMPILER_SUPPORT_cstd_typeindex 1
    #undef  CXXO_COMPILER_SUPPORT_common_type







|
>




|




|


>
>
>
>
>
>





<
<
<
<







 







|







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83




84
85
86
87
88
89
90
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
 * MSVC headers tend to be organized via a 
 * path like ${VISUAL_STUDIO}/VC/include
 */
#undef  CXXO_INCLUDE_SYS
#define CXXO_INCLUDE_SYS(NAME) <../../VC/include/NAME>
#if defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1)
    #pragma message CXXO_NOTICE("Using Windows+MSC include paths: " ) 
    #pragma message CXXO_NOTICE( CXXO_STRINGIZE1(CXXO_INCLUDE_SYS(name)) ) 
#endif


// At least VC2005
#if (CXXOMFORT_COMPILER_VERSION > 1300)
#endif


#if (CXXOMFORT_COMPILER_VERSION >= 1500) // VC 2008 or higher
    #if (_MSC_FULL_VER == 150030729) // SP1
        #undef  CXXOMFORT_COMPILER_VERSION
        #define CXXOMFORT_COMPILER_VERSION 1501
		#undef  CXXO_COMPILER_SUPPORT_tr1_array 
		#define CXXO_COMPILER_SUPPORT_tr1_array 1
		#undef  CXXO_COMPILER_SUPPORT_tr1_tuple 
		#define CXXO_COMPILER_SUPPORT_tr1_tuple 1
		#undef  CXXO_COMPILER_SUPPORT_tr1_type_traits
		#define CXXO_COMPILER_SUPPORT_tr1_type_traits 1
    #endif
    #undef  CXXO_COMPILER_SUPPORT_compiler_intrinsics_is_x
    #define CXXO_COMPILER_SUPPORT_compiler_intrinsics_is_x 1
    #undef  CXXO_COMPILER_SUPPORT_va_args
    #define CXXO_COMPILER_SUPPORT_va_args 1




    
#endif

// At least VC2010
#if (CXXOMFORT_COMPILER_VERSION >= 1600) // VC10 or higher
    #if (_MSC_FULL_VER == 160040219) // SP1
        #undef  CXXOMFORT_COMPILER_VERSION
................................................................................
    #undef  CXXO_COMPILER_SUPPORT_unique_ptr
    #define CXXO_COMPILER_SUPPORT_unique_ptr 1

    
#endif

// -- TODO -- get my claws on a MSVC 2012 / 2013 for actual testing
// -- NEW TODO -- get my claws on the MSVC 2013 and CTP

#if (CXXOMFORT_COMPILER_VERSION >= 1700) // At least VC 2012
    #undef  CXXO_COMPILER_SUPPORT_cstd_cstdint 
    #define CXXO_COMPILER_SUPPORT_cstd_cstdint 1
    #undef  CXXO_COMPILER_SUPPORT_cstd_typeindex
    #define CXXO_COMPILER_SUPPORT_cstd_typeindex 1
    #undef  CXXO_COMPILER_SUPPORT_common_type

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

27
28
29
30
31
32
33

34
35
36
37
38
39
40
41







42
43
44
45
46
47
48
#define CXXOMFORT_COMPILER_VERSION (__WATCOMC__/100)
#define CXXOMFORT_COMPILER_VERSION_FULL (__WATCOMC__)
/* Versions - __WATCOMC__ 
 * * 1290 --> Open Watcom 1.9
 * * 1300 --> Open Watcom 2.0 beta from the travis-ci
 * 
 * */


#define CXXO_PRAGMA(x) _Pragma (#x)
#undef  CXXO_NOTICE
#define CXXO_NOTICE(msg) ( msg )

#if defined(CXXOMFORT_NOTICES)
	#pragma message ("Found Watcom/OpenWatcom [" CXXO_STRINGIZE1(__WATCOMC__) "]" )
#endif








#if (CXXOMFORT_COMPILER_VERSION_FULL < 1400)
    #define CXXOFLAG_NO_INITIALIZERS
#endif

// wait for OWC++ implementors to lower this bound
// for when we don't need fixes







>








>
>
>
>
>
>
>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#define CXXOMFORT_COMPILER_VERSION (__WATCOMC__/100)
#define CXXOMFORT_COMPILER_VERSION_FULL (__WATCOMC__)
/* Versions - __WATCOMC__ 
 * * 1290 --> Open Watcom 1.9
 * * 1300 --> Open Watcom 2.0 beta from the travis-ci
 * 
 * */


#define CXXO_PRAGMA(x) _Pragma (#x)
#undef  CXXO_NOTICE
#define CXXO_NOTICE(msg) ( msg )

#if defined(CXXOMFORT_NOTICES)
	#pragma message ("Found Watcom/OpenWatcom [" CXXO_STRINGIZE1(__WATCOMC__) "]" )
#endif

#undef  CXXO_INCLUDE_SYS
#define CXXO_INCLUDE_SYS(NAME) <../h/NAME>
#if (defined(CXXOMFORT_NOTICES) && CXXOMFORT_NOTICES > 1)
	#pragma message(CXXO_NOTICE( "Using include path:" ))
	#pragma message(CXXO_NOTICE( CXXO_STRINGIZE1(CXXO_INCLUDE_SYS(name) ) ) )
#endif

#if (CXXOMFORT_COMPILER_VERSION_FULL < 1400)
    #define CXXOFLAG_NO_INITIALIZERS
#endif

// wait for OWC++ implementors to lower this bound
// for when we don't need fixes

Changes to cxxomfort/cxxomfort/cstddef.hpp.

27
28
29
30
31
32
33









34
35
36
37
38
39


40
41
42
43
44
45
46
#if (CXXOMFORT_CXX_STD>=2011)
	typedef decltype(NULL) NULL_t;
#elif (CXXO_COMPILER_SUPPORT_typeof)
	typedef __typeof__(NULL) NULL_t;
#else
	typedef int NULL_t;
#endif









}

#include "base/nullptr.hpp"  // nullptr_t
#include "base/static_assert.hpp"
	#if (CXXOMFORT_CXX_STD>=1997)
	#include "impl/17-byte.hpp" // c++17's "byte"


	#endif

#endif

/**
 * @page std0cstddef <cstddef>
 * @brief Features related to Standard header <code><cstddef></code>.







>
>
>
>
>
>
>
>
>




<
|
>
>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54
55
56
#if (CXXOMFORT_CXX_STD>=2011)
	typedef decltype(NULL) NULL_t;
#elif (CXXO_COMPILER_SUPPORT_typeof)
	typedef __typeof__(NULL) NULL_t;
#else
	typedef int NULL_t;
#endif


struct enum_sample {
	enum type { value0 = 0, value1 = 1};
	enum { value = sizeof(type) };
};



}

#include "base/nullptr.hpp"  // nullptr_t
#include "base/static_assert.hpp"

#include "impl/17-byte.hpp" // c++17's "byte"

	#if (CXXOMFORT_CXX_STD>=1997)
	#endif

#endif

/**
 * @page std0cstddef <cstddef>
 * @brief Features related to Standard header <code><cstddef></code>.

Changes to cxxomfort/cxxomfort/impl/11-common_type.hpp.

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
		// no typeof emulation; at most, we can get promotes.
		// 

template <typename T1, typename T2> 
struct common_type <T1,T2> {
	private:
	struct common_type_cant_resolve; 
	template <typename Q> static typename std::add_lvalue_reference<Q>::type dv ();
	enum { 
		samey = cxxomfort::traits::is_same<T1,T2>::value, 
		convertible_12 = std::tr1::is_convertible<T1,T2>::value ,
		convertible_21 = std::tr1::is_convertible<T2,T1>::value
	};
	static_assert (convertible_12 || convertible_21, "cxxomfort: common_type<...> instantiation can not resolve");
	typedef std::conditional< 







|







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
		// no typeof emulation; at most, we can get promotes.
		// 

template <typename T1, typename T2> 
struct common_type <T1,T2> {
	private:
	struct common_type_cant_resolve; 
	template <typename Q> static typename std::add_reference<Q>::type dv ();
	enum { 
		samey = cxxomfort::traits::is_same<T1,T2>::value, 
		convertible_12 = std::tr1::is_convertible<T1,T2>::value ,
		convertible_21 = std::tr1::is_convertible<T2,T1>::value
	};
	static_assert (convertible_12 || convertible_21, "cxxomfort: common_type<...> instantiation can not resolve");
	typedef std::conditional< 

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

49
50
51
52
53
54
55

56
57
58
59

60
61
62
63
}
    
} } // cxxomfort::cxxostd


#if (defined(CXXOFLAG_NO_STD_USING) && CXXOFLAG_NO_STD_USING>0 )
#else

namespace std {
    using cxxomfort::cxxostd::as_const;

}

#endif


#endif // file







>


|
<
>




49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64
}
    
} } // cxxomfort::cxxostd


#if (defined(CXXOFLAG_NO_STD_USING) && CXXOFLAG_NO_STD_USING>0 )
#else
	#if (CXXOMFORT_CXX_STD<2017)
namespace std {
    using cxxomfort::cxxostd::as_const;
}

	#endif
#endif


#endif // file

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

27
28
29
30
31
32
33


34
35



36
37
38
39
40
41
42
43
44
45
46
47
48


49








50
51

52
53
54

55
56
57
58
59

60
61
62
63
64
65


66
67
68
69
70






71
72
73
74

75

76
77


78
79
80
81
82
83
84
85
86
87


88
89

90
91
92
93
94


95
96

97

98
99
100


101
102
103
104
105
106

107



108

109
110




111
112
113
114

115
116
117
118
119
120
121
122
123
124
125



126

127

















128
129
130

131



132
133

134
135
136


137

138
139







140
141
142
143

144
145
146
147

148





149
150

151

152


153
154

155

156

157

158
159












160
161
162
163
164
165

166
167
168
169
170

171
172
173
174






175
176
177
178

179
180
181


182
183
184
185
186
187

188
189
190
191

192
193
194






195
196
197
198
199
200
201
202

203
204
205
206



207





208

209



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
 * byte |, &, ^ byte
 * byte << integer, byte >> integer
 * 
 * byte byte(char) <-- explicit
 * 
 */




#if (CXXOMFORT_CXX_STD>=2017)




#elif (CXXOMFORT_CXX_STD>=1997)
    #define CXXOMFORT_USING_stdbyte
    #define CXXOMFORT_IMPLEMENTS_byte 0
    #define CXXOMFORT_IMPLEMENTS_p0298r3 0
#endif

// -----
// implementation
//

#if (defined(CXXOMFORT_USING_stdbyte))
namespace cxxomfort { namespace cxxostd {











    #if (CXXOMFORT_CXX_STD >= 2011)
        //#define CXXOMFORT_IMPLEMENTS_p0298r2 CXXO_IMPLSTATUS_BACKPORT()

        //#define CXXOMFORT_IMPLEMENTS_p0298r3 CXXOMFORT_IMPLEMENTS_p0298r2
        //#define CXXOMFORT_IMPLEMENTS_byte CXXOMFORT_IMPLEMENTS_p0298r3


        
enum class byte : unsigned char {};


template <typename Int, typename = typename std::enable_if< std::is_integral<Int>::value>::type >

constexpr inline Int to_integer (byte b) noexcept { 
    return static_cast<Int>(b);
}

template <typename Int, typename = typename std::enable_if< std::is_integral<Int>::value>::type >
constexpr static inline byte to_byte (Int i) noexcept {


    return static_cast<byte>(i);
}
        
    #else
        //#define CXXOMFORT_IMPLEMENTS_p0298r2 CXXO_IMPLSTATUS_EMULATION()






        //#define CXXOMFORT_IMPLEMENTS_p0298r3 CXXOMFORT_IMPLEMENTS_p0298r2
        //#define CXXOMFORT_IMPLEMENTS_byte CXXOMFORT_IMPLEMENTS_p0298r3
        // these three go here to ensure that we call namespace std outside
        }}

        #include "./typesafe_enum-core.hpp"

        namespace cxxomfort { namespace cxxostd {



namespace detail { // detail

struct mybyte_def { enum type {};  };
typedef cxxomfort::impl::typesafe_enum<mybyte_def,unsigned char> byteimpl;
// quick and easy encapsulation

}

struct byte
: public detail::byteimpl  {


    private:
    typedef detail::byteimpl underlying_t;

    public:

    CXXO_DEFAULT_DEFAULT_CONSTRUCTOR(byte);

    CXXO_CONSTEXPR byte (byte const& b) CXXO_NOEXCEPTNOTHROW : detail::byteimpl((detail::byteimpl const&)b) {}



    using detail::byteimpl::underlying;

    //using detail::byteimpl::CXXO_EXPLICIT_OPERATOR(unsigned char);



    //using detail::byteimpl::equals;



    //byte& operator= (byte const& b) CXXO_NOEXCEPT {
    //    (unsigned char&)(*this)= b.underlying();
    //    return *this;
    //}


    friend bool operator== (byte, byte) CXXO_NOEXCEPTNOTHROW;





    template <typename T>
    friend T to_integer (byte) CXXO_NOEXCEPTNOTHROW;





    template <typename T>
    friend byte to_byte (T) CXXO_NOEXCEPT;



    private:
    typedef detail::byteimpl this_base;
};
static_assert (sizeof(byte)==sizeof(char), "Implementation failure: byte needs to have the same sizeof as char!");
static_assert (std::is_integral<byte>::value==false, "Implementation failure: byte reads as an integral type!");

/**
 * @ingroup cxx17-backports
 * @{
 */























template <typename TInt >
TInt to_integer (byte b) CXXO_NOEXCEPTNOTHROW {
    static_assert (std::is_integral<TInt>::value, "is_integral");

    return static_cast<TInt>( explicit_cast<unsigned char>(b) );



}


template <typename TI> 
byte to_byte (TI i) CXXO_NOEXCEPT {
    static_assert (std::is_integral<TI>::value, "is_integral");


    byte by; (unsigned char&)by= static_cast<unsigned char>(i);

    return by;
}








inline bool operator== (byte b1, byte b2) CXXO_NOEXCEPTNOTHROW {
    return b1.underlying()==b2.underlying();
}


inline bool operator!= (byte const& b1, byte const& b2) CXXO_NOEXCEPTNOTHROW {
    return !(b1==b2);
}







/**
 * @}

 */





    #endif // CXXO_STD



// Bitask / Binary logical operators




//! @brief AND (&) of two @c byte s.












CXXO_CONSTEXPR static inline byte operator& (byte b1, byte b2) CXXO_NOEXCEPT {
    //static_assert (sizeof(byte)==1, "sizeof(byte)==1");
    return to_byte (to_integer<unsigned>(b1) & to_integer<unsigned>(b2));
}

//! @brief OR (|) of two @c byte s.

CXXO_CONSTEXPR static inline byte operator| (byte b1, byte b2) CXXO_NOEXCEPT {
    return to_byte (to_integer<unsigned>(b1) | to_integer<unsigned>(b2));
}

//! @brief XOR (^) of two @c byte s.

CXXO_CONSTEXPR static inline byte operator^ (byte b1, byte b2) CXXO_NOEXCEPT {
    return to_byte (to_integer<unsigned>(b1) ^ to_integer<unsigned>(b2));
}







CXXO_CONSTEXPR14 static inline byte& operator&= (byte& b1, byte b2) CXXO_NOEXCEPT {
    return b1= b1 & b2;
}


CXXO_CONSTEXPR14 static inline byte& operator|= (byte& b1, byte b2) CXXO_NOEXCEPT {
    return b1= b1 | b2;
}


CXXO_CONSTEXPR14 static inline byte& operator^= (byte& b1, byte b2) CXXO_NOEXCEPT {
    return b1= b1 ^ b2;
}


CXXO_CONSTEXPR static inline byte operator<< (byte b1, unsigned u2) CXXO_NOEXCEPT {

    return to_byte(to_integer<unsigned char>(b1) << u2);
}

CXXO_CONSTEXPR static inline byte operator>> (byte b1, unsigned u2) CXXO_NOEXCEPT {

    return to_byte(to_integer<unsigned char>(b1) >> u2);
}







CXXO_CONSTEXPR14 static inline byte& operator<<= (byte& b1, unsigned u2) CXXO_NOEXCEPT {
    return b1 = b1 << u2;
}

CXXO_CONSTEXPR14 static inline byte& operator>>= (byte& b1, unsigned u2) CXXO_NOEXCEPT {
    return b1 = b1 >> u2;
}



CXXO_CONSTEXPR14 static inline byte operator~ (byte const& b1) CXXO_NOEXCEPT {
    return to_byte(~to_integer<unsigned char>(b1));
}









} } // cxxomfort::cxxostd





namespace cxxomfort { namespace fix {

/**
 * @brief Construct a 'byte' value from an integer.
 * @ingroup cxx17-backports
 */

	using cxxomfort::cxxostd::to_byte;

} } // cxxomfort::fix

    #if (defined(CXXOFLAG_NO_STD_USING) && CXXOFLAG_NO_STD_USING>0 )
    #else
namespace std {
    //! @ref cxx17-backports
    using cxxomfort::cxxostd::byte;
    using cxxomfort::cxxostd::to_integer;
}
    #endif


#else // c++17
    // nothing to do but define to_byte

    namespace cxxomfort::cxxostd {
        constexpr static inline std::byte to_byte (unsigned char i) noexcept { return std::byte{i}; }
    }


#endif // stdbyte

#if (defined(DOXYGEN_DOC))
namespace std {
/**
 * @class byte
 * @brief "byte" type for C++17.
 * @ingroup cxx17-backports
 * @xrefitem std0cstddef "<cstddef>" "std::byte"







>
>

<
>
>
>

|
<
<
<
<

|
<
<

<
|
>
>

>
>
>
>
>
>
>
>
|
<
>
|
<

>
|


<
|
>
|
|


|
<
>
>
|

|
<
<
>
>
>
>
>
>
|
<
<
<
>
|
>
|

>
>
|

|
|
<



|
|
>
>

|
>


|
|
<
>
>
|
|
>
|
>
|
|
<
>
>

<
<
<
|

>
|
>
>
>
|
>
|
|
>
>
>
>
|
<
<

>

<
<
<
<
<

<
<
<
<
>
>
>

>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
<
>
|
>
>
>


>
|
|
<
>
>
|
>
|

>
>
>
>
>
>
>
|
<
<
|
>

<
<
|
>

>
>
>
>
>
|
<
>
|
>

>
>

<
>

>
|
>

>

<
>
>
>
>
>
>
>
>
>
>
>
>
|
<
|


<
>
|
|


<
>
|
|


>
>
>
>
>
>
|
|


>
|
|

>
>
|
|


<
|
>
|


|
>
|


>
>
>
>
>
>
|
|


<
<
|

>

<
<
|
>
>
>

>
>
>
>
>
|
>
|
>
>
>






<




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







27
28
29
30
31
32
33
34
35
36

37
38
39
40
41




42
43


44

45
46
47
48
49
50
51
52
53
54
55
56
57

58
59

60
61
62
63
64

65
66
67
68
69
70
71

72
73
74
75
76


77
78
79
80
81
82
83



84
85
86
87
88
89
90
91
92
93
94

95
96
97
98
99
100
101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117

118
119
120



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136


137
138
139





140




141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

166
167
168
169
170
171
172
173
174
175

176
177
178
179
180
181
182
183
184
185
186
187
188
189


190
191
192


193
194
195
196
197
198
199
200
201

202
203
204
205
206
207
208

209
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224
225
226
227
228
229

230
231
232

233
234
235
236
237

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262

263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282


283
284
285
286


287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

309
310
311
312




















313
314
315
316
317
318
319
 * byte |, &, ^ byte
 * byte << integer, byte >> integer
 * 
 * byte byte(char) <-- explicit
 * 
 */

#include <cxxomfort/util/type_traits.hpp>
#include <cstring>


//
// new impl 
//

#if (CXXOMFORT_CXX_STD>=2017 || CXXO_COMPILER_SUPPORT_std_byte)





	#define CXXOMFORT_IMPLEMENTS_p0298r3 CXXO_IMPLSTATUS_NATIVE()




namespace cxxomfort { namespace cxxostd { 
	using std::byte;
	using std::to_integer;

template <typename I, typename = typename std::enable_if<std::is_integral<I>::value>::type >
constexpr byte 
to_byte (I i) noexcept {
	return byte{i};
}
	
} }  // cxxomfort::cxxostd

#elif (CXXOMFORT_CXX_STD>=2011)

	// implement using enum class
	#define CXXOMFORT_IMPLEMENTS_p0298r3 CXXO_IMPLSTATUS_BACKPORT()


namespace cxxomfort { namespace cxxostd {

enum class byte : unsigned char {};


template <typename I, typename = typename std::enable_if<std::is_integral<I>::value>::type >
constexpr  inline 
I to_integer (byte b) noexcept {
	return I(b);
}

template <typename I, typename = typename std::enable_if<std::is_integral<I>::value>::type >

constexpr  inline 
byte to_byte (I i) noexcept {
	return static_cast<byte>(i);
}




} } // cxxomfort::cxxostd

#elif (0&&CXXOMFORT_CXX_STD>=1997)
	// implement using typesafe_enum

	#define CXXOMFORT_IMPLEMENTS_p0298r3 CXXO_IMPLSTATUS_EMULATION()




#include "typesafe_enum-core.hpp"

namespace cxxomfort { namespace cxxostd {

struct byte;

namespace detail {

	struct mybyte_def { enum type {};  };
	typedef cxxomfort::impl::typesafe_enum<mybyte_def,unsigned char> byteimpl;


}

struct byte 
//: private detail::byteimpl 
{

    private:
    typedef detail::byteimpl impl_t;

    public:

    //CXXO_DEFAULT_DEFAULT_CONSTRUCTOR(byte);
    

    //byte (byte const& by) CXXO_NOEXCEPTNOTHROW 
    //: impl_t(by) {}
    
    //using detail::byteimpl::CXXO_EXPLICIT_OPERATOR(unsigned char);
    
    CXXO_EXPLICIT_OPERATOR(unsigned char) () const CXXO_NOEXCEPTNOTHROW {
		return explicit_cast<unsigned char>(impl);
	}
    

    private:
    impl_t impl;




};

template <typename Integral>
Integral to_integer (byte b) CXXO_NOEXCEPTNOTHROW {
	using namespace std;
	static_assert (is_integral<Integral>::value, "to_integer");
	return explicit_cast<unsigned char>(b);
}

template <typename Integral>
byte to_byte (Integral i) CXXO_NOEXCEPTNOTHROW {
	using namespace std;
	byte b;
	(unsigned char&)(b) = static_cast<unsigned char>(i);
	return b;
}



} }  // cxxomfort::cxxostd











#else 
	// implement using a simple struct
	#define CXXOMFORT_IMPLEMENTS_p0298r3 CXXO_IMPLSTATUS_EMULATION()

namespace cxxomfort { namespace cxxostd {

#pragma pack(push,1)
struct byte {
	public:
	//CXXO_DEFAULT_DEFAULT_CONSTRUCTOR(byte);
	//CXXO_DEFAULT_COPY_CONSTRUCTOR(byte,  CXXO_NOEXCEPTNOTHROW
	//, v(From.v) 
	//);
	
	CXXO_EXPLICIT_OPERATOR(unsigned char) () const CXXO_NOEXCEPTNOTHROW {
		return v;
	}

	private:
	unsigned char v;
};
#pragma pack(pop)

template <typename I>
I to_integer (byte b) CXXO_NOEXCEPTNOTHROW {

	using namespace std;
	return explicit_cast<unsigned char>(b);
	//I i= 0;
	//memcpy(&i, &b, 1);
	//return i;
}

#if (CXXOMFORT_CXX_STD>=1997)
template <typename I>
byte to_byte (I i) CXXO_NOEXCEPTNOTHROW {

	using namespace std;
	byte b;
	unsigned char c= static_cast<unsigned char>(i);
	memcpy(&b, &c, 1);
	return b;
}
#else
static inline 
byte to_byte (unsigned u) CXXO_NOEXCEPTNOTHROW {
	using namespace std;
	byte b;
	memcpy(&b,&u,1);
	return b;
}



#endif




} } // cxxomfort::cxxostd


#endif

	#define CXXOMFORT_IMPLEMENTS_byte CXXOMFORT_IMPLEMENTS_p0298r3

// 

// internal checks 
// 
namespace cxxomfort { namespace cxxostd {

static_assert(sizeof(byte) == sizeof(char), "byte: sizeof check");
static_assert (cxxomfort::traits::is_integral<byte>::value==false, "byte: separate-type check");


} }

// 
// operators
// 

namespace cxxomfort { namespace cxxostd {


CXXO_CONSTEXPR static inline 
bool operator== (byte b1, byte b2) CXXO_NOEXCEPTNOTHROW {
	return to_integer<unsigned>(b1) == to_integer<unsigned>(b2);
}

CXXO_CONSTEXPR static inline 
bool operator!= (byte b1, byte b2) CXXO_NOEXCEPTNOTHROW {
	return to_integer<unsigned>(b1) != to_integer<unsigned>(b2);
}


CXXO_CONSTEXPR static inline 
byte operator& (byte b1, byte b2) CXXO_NOEXCEPTNOTHROW {

	return to_byte( to_integer<unsigned>(b1) & to_integer<unsigned>(b2) );
}


CXXO_CONSTEXPR static inline 
byte operator| (byte b1, byte b2) CXXO_NOEXCEPTNOTHROW {
	return to_byte( to_integer<unsigned>(b1) | to_integer<unsigned>(b2) );
}


CXXO_CONSTEXPR static inline 
byte operator^ (byte b1, byte b2) CXXO_NOEXCEPTNOTHROW {
	return to_byte( to_integer<unsigned>(b1) ^ to_integer<unsigned>(b2) );
}

CXXO_CONSTEXPR static inline 
byte operator~ (byte b1) CXXO_NOEXCEPTNOTHROW {
	return to_byte( ~to_integer<unsigned>(b1) );
}

static inline 
byte operator&= (byte& b1, byte b2) CXXO_NOEXCEPTNOTHROW {
	return b1= b1 & b2;
}

static inline 
byte operator|= (byte& b1, byte b2) CXXO_NOEXCEPTNOTHROW {
	return b1= b1 | b2;
}

static inline 
byte operator^= (byte& b1, byte b2) CXXO_NOEXCEPTNOTHROW {
	return b1= b1 ^ b2;
}


CXXO_CONSTEXPR static inline 
byte operator>> (byte b1, unsigned s) CXXO_NOEXCEPTNOTHROW {
	return to_byte(to_integer<unsigned>(b1) >> s);
}

CXXO_CONSTEXPR static inline 
byte operator<< (byte b1, unsigned s) CXXO_NOEXCEPTNOTHROW {
	return to_byte(to_integer<unsigned>(b1) << s);
}

static inline 
byte& operator>>= (byte& b1, unsigned s) CXXO_NOEXCEPTNOTHROW {
	return b1= b1 >> s;
}

static inline 
byte& operator<<= (byte& b1, unsigned s) CXXO_NOEXCEPTNOTHROW {
	return b1= b1 << s;
}





} } 




// 
// using 
// 

#if (defined(CXXOFLAG_NO_STD_USING) && CXXOFLAG_NO_STD_USING>0 )
#elif (CXXOMFORT_IMPLEMENTS_byte==CXXO_IMPLSTATUS_NATIVE())
#else
namespace std {
    //! @ref cxx17-backports
    using cxxomfort::cxxostd::byte;
    using cxxomfort::cxxostd::to_integer;
}
#endif


namespace cxxomfort { namespace fix {

/**
 * @brief Construct a 'byte' value from an integer.
 * @ingroup cxx17-backports
 */

	using cxxomfort::cxxostd::to_byte;

} } // cxxomfort::fix





















#if (defined(DOXYGEN_DOC))
namespace std {
/**
 * @class byte
 * @brief "byte" type for C++17.
 * @ingroup cxx17-backports
 * @xrefitem std0cstddef "<cstddef>" "std::byte"

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

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
    static const size_type npos= size_type(-1);

    
    public:
    // def-ctor
    CXXO_DEFAULT_DEFAULT_CONSTRUCTOR(basic_string_view);
    CXXO_CONSTEXPR CXXO_DEFAULT_COPY_CONSTRUCTOR(basic_string_view,CXXO_NOTHROW,
    membertype(v) );
    
    //! String view to a buffer of characters at position @e px and length @e sz .
    CXXO_CONSTEXPR basic_string_view (pointer px, size_t sz) CXXO_NOEXCEPTNOTHROW
    : membertype(px,sz)
    {}
    
    //! String view to a buffer of characters at position @e px to be processed via character_traits.







|







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
    static const size_type npos= size_type(-1);

    
    public:
    // def-ctor
    CXXO_DEFAULT_DEFAULT_CONSTRUCTOR(basic_string_view);
    CXXO_CONSTEXPR CXXO_DEFAULT_COPY_CONSTRUCTOR(basic_string_view,CXXO_NOTHROW,
    membertype(From) );
    
    //! String view to a buffer of characters at position @e px and length @e sz .
    CXXO_CONSTEXPR basic_string_view (pointer px, size_t sz) CXXO_NOEXCEPTNOTHROW
    : membertype(px,sz)
    {}
    
    //! String view to a buffer of characters at position @e px to be processed via character_traits.

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

240
241
242
243
244
245
246

247
248
249
250
251
252
253
    private:
    CXXO_CONSTEXPR14 void check_range (size_t i) const {
        if (i>=len_) throw std::out_of_range("array_ref: out of range");
    }
#if (CXXOMFORT_CXX_STD>=1997)
    void check_range (size_t i, std::error_code& ec) const {
        if (i>=len_) ec= std::make_error_code(cxxomfort::fix::errc::invalid_argument /*, std::generic_category() */);

    }
#endif
    
    pointer    ptr_;
    size_t     len_ CXXOMFORT_CXX11_CODE(= 0, ;);

}; // array_ref







>







240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
    private:
    CXXO_CONSTEXPR14 void check_range (size_t i) const {
        if (i>=len_) throw std::out_of_range("array_ref: out of range");
    }
#if (CXXOMFORT_CXX_STD>=1997)
    void check_range (size_t i, std::error_code& ec) const {
        if (i>=len_) ec= std::make_error_code(cxxomfort::fix::errc::invalid_argument /*, std::generic_category() */);
        
    }
#endif
    
    pointer    ptr_;
    size_t     len_ CXXOMFORT_CXX11_CODE(= 0, ;);

}; // array_ref

Added cxxomfort/cxxomfort/impl/p1223r0-find_backward.hpp.







































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef CXXOMFORT_IMPL_p1223_HPP
#define CXXOMFORT_IMPL_p1223_HPP

/**
 * @file
 * @brief Implements part of p1223, a proposal for an algorithm to find an element backwards.
 * */

namespace cxxomfort { namespace impl {

namespace detail_algorithm {

template <typename It, typename T>
It find_backward (It ini, It fin, T const& t, std::bidirectional_iterator_tag) {
	if (ini == fin) return fin;
	while (fin-- != ini) {
		if (*fin == t) return fin;
	}
	return fin;
}

template <typename It, typename Pred>
It find_if_backward (It ini, It fin, Pred if_, std::bidirectional_iterator_tag) {
	if (ini == fin) return fin;
	while (fin-- != ini) {
		if (if_(*fin)) return fin;
	}
	return fin;
}


} // detail_algorithm

template <typename It, typename T>
It find_backward (It ini, It fin, T const& t) {
	typename std::iterator_traits<It>::iterator_category cat_It;
	return detail_algorithm::find_backward(ini,fin,t,cat_it);
}

template <typename It, typename Pred>
It find_if_backward (It ini, It fin, Pred if_) {
	typename std::iterator_traits<It>::iterator_category cat_It;
	return detail_algorithm::find_if_backward(ini,fin,if_,cat_it);
}



} }


#endif

Changes to cxxomfort/cxxomfort/impl/using_tr1_type_traits.hpp.

1
2
3
4
5
6
7


8
9
10
11
12
13
14
#ifndef CXXOMFORT_IMPL_USING_tr1_type_traits_HPP
#define CXXOMFORT_IMPL_USING_tr1_type_traits_HPP

#include <type_traits>

// for tr1 we bring at least the basic type traits
#if (CXXOMFORT_CXX_STD < 2011 && CXXO_COMPILER_SUPPORT_tr1_type_traits) 


namespace std {
    using tr1::integral_constant;
    using tr1::false_type;
    using tr1::true_type;
    using tr1::is_same;
    using tr1::is_integral;
    using tr1::is_floating_point;



<
<


>
>







1
2
3


4
5
6
7
8
9
10
11
12
13
14
#ifndef CXXOMFORT_IMPL_USING_tr1_type_traits_HPP
#define CXXOMFORT_IMPL_USING_tr1_type_traits_HPP



// for tr1 we bring at least the basic type traits
#if (CXXOMFORT_CXX_STD < 2011 && CXXO_COMPILER_SUPPORT_tr1_type_traits) 
#include <type_traits>

namespace std {
    using tr1::integral_constant;
    using tr1::false_type;
    using tr1::true_type;
    using tr1::is_same;
    using tr1::is_integral;
    using tr1::is_floating_point;

Changes to cxxomfort/cxxomfort/library/algorithm.hpp.

1
2
3
4

5
6
7
8
9
10
11
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
76
77
78
79
80
81
82









































83
84
85
86
87
88
89
..
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
315
316
317
318
319
320
321

322
323
324
325
326
327
328
#ifndef CXXOMFORT_CXXO_ALGORITHM_SUPP_HPP
#define CXXOMFORT_CXXO_ALGORITHM_SUPP_HPP
#include <cxxomfort/config.hpp>
#include <cxxomfort/base.hpp>

#include <algorithm>
#include <iterator>

/**
 * @file cxxomfort/library/algorithm.hpp
 * @brief cxxomfort Supplementals for <algorithm>
 * @xrefitem cxxo-sup-algorithm
................................................................................
 * @ingroup cxxo-sup-algorithm
 * @{
 */

// copy_leftmost_n is simply copy_n

/**
 * @brief Like @c copy_n in that it copues @e leftmost @a ("starting") n elements from the sequence.
 * @xrefitem cxxo-sup-algorithm "cxxo-sup-algorithm" "Copying"
 * 
 * See also: copy_rightmost_n() .
 * 
 * */
template <typename Iter1, typename Integer, typename Iter2>
Iter2 copy_leftmost_n (Iter1 ini1, Iter1 , Integer n, Iter2 ini2) {
................................................................................
 */
template <typename It1, typename Integer, typename It2>
It2 copy_rightmost_n (It1 ini1, It1 fin1, Integer n, It2 ini2) {
    const typename std::iterator_traits<It1>::iterator_category cat;
    return detail::copy_rightmost_n(ini1, fin1, n, ini2, cat);
}











































/** 
 * @brief Finds a pair of elements that are out of place (ie.: the second one is "less" than the first).
 * @return Iterator pointing to the first such element, or @a fin if none.
 * @xrefitem cxxo-sup-algorithm "" "Sorting"
 * 
 * For example, for the following example @c find_inversion will return an iterator pointing to the element 6:
................................................................................

 * @endcode
 * 
 * See also: @c fix_inversion().
 * 
**/
template <typename Iter, typename Less> inline
Iter find_inversion (Iter ini, Iter fin, Less m) {
    using namespace std;
    for (; ini != fin && next(ini,1) != fin; ++ini) {
        Iter inext= ini; ++inext;
        if (fin != inext && m(*inext,*ini)) break;
    }
    return ini;
}

template <typename Iter> inline
Iter find_inversion (Iter ini, Iter fin) {
    std::less<typename Iter::value_type> m;
................................................................................
    }
    return ret;
}

} // .detail::

/**
 * @brief Finds the latest item in a sequence that fulfills @c f .
 * @param ini,fin Delimiters to the sequence to be examined.
 * @param f A predicate (a function from <var>ini...fin</var>'s alue type to @c bool ).
 * @return An iterator pointing to the latest item in <code>[ini,fin)</code> that fulfills @c f .
 * @anchor find_last_if
 */
template <typename Iter, typename Pred>
Iter find_last_if (Iter ini, Iter fin, Pred f) {
    const typename std::iterator_traits<Iter>::iterator_category cat;
    return detail::find_last_if(ini, fin, f, cat);
}


//! count_while proposal
//! https://groups.google.com/a/isocpp.org/forum/?fromgroups#!topic/std-proposals/bXrQrkBw59c
template <class InputIterator, class UnaryPredicate>
typename std::iterator_traits<InputIterator>::difference_type
................................................................................
 * family of <code>_n</code> functions such as <code>transform_n</code>.
 * 
 * Interfaces defined here:
 * 
 * * @c valcmp() - compares two values in the way strcmp, memcmp do.
 * * @c copy_leftmost_n() , @c copy_rightmost_n () - copies from either end of a sequence.
 * * @c count_while() - counts elements in a sequence.

 * * @c find_inversion() - finds elements out of place in a sequence.
 * * @c find_last_if() - finds elements matching a predicate.
 * * @c transform_inplace() , @c transform_inplace_if() - transforms sequences in-place.
 * * @c transform_n() - transforms sequences.
 * * @c count_frequencies_map() , @c count_frequencies() - gathers data frequency in a sequence.
 * * @c relative_search() - finds element ranges matching a differential.
 * * @c lfv2::erase(), lfv2::erase_if() from Fundamentals V2 - simplified erase-remove idiom for sequence containers.




>







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|



|







 







|

|
|



|

|







 







>







1
2
3
4
5
6
7
8
9
10
11
12
..
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
...
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
...
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
...
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
#ifndef CXXOMFORT_CXXO_ALGORITHM_SUPP_HPP
#define CXXOMFORT_CXXO_ALGORITHM_SUPP_HPP
#include <cxxomfort/config.hpp>
#include <cxxomfort/base.hpp>
#include <cxxomfort/algorithm.hpp>
#include <algorithm>
#include <iterator>

/**
 * @file cxxomfort/library/algorithm.hpp
 * @brief cxxomfort Supplementals for <algorithm>
 * @xrefitem cxxo-sup-algorithm
................................................................................
 * @ingroup cxxo-sup-algorithm
 * @{
 */

// copy_leftmost_n is simply copy_n

/**
 * @brief Like @c copy_n in that it copies @e leftmost @a ("starting") n elements from the sequence.
 * @xrefitem cxxo-sup-algorithm "cxxo-sup-algorithm" "Copying"
 * 
 * See also: copy_rightmost_n() .
 * 
 * */
template <typename Iter1, typename Integer, typename Iter2>
Iter2 copy_leftmost_n (Iter1 ini1, Iter1 , Integer n, Iter2 ini2) {
................................................................................
 */
template <typename It1, typename Integer, typename It2>
It2 copy_rightmost_n (It1 ini1, It1 fin1, Integer n, It2 ini2) {
    const typename std::iterator_traits<It1>::iterator_category cat;
    return detail::copy_rightmost_n(ini1, fin1, n, ini2, cat);
}


// 
// binary predicate find, from lwg217
//

template <typename It, typename Pred, typename T>
It find (It ini, It fin, Pred if_, T const& v) {
	using namespace std;
	return find_if(ini,fin, bind(if_,placeholders::_1,v) );
}

//
// find_not, find_if_not from p1223ro (dropped in r1)
// 

/**
 * @brief Finds the first element in the sequence not equal to @e t .
 * @return An iterator, or @e fin .
 * @see @c find() 
 * */
template <typename It, typename T>
It find_not (It ini, It fin, T const& t) {
	using namespace std;
	for (; ini != fin; ++ini) {
		if (t==*ini) {} else { return ini; }
	}
	return fin;
}


/**
 * @brief Finds the first element in the sequence not fitting predicate @e if_ .
 * @return An iterator, or @e fin .
 * @see @c find_if() 
 * */
template <typename It, typename Pred>
It find_if_not (It ini, It fin, Pred if_) {
	using namespace std;
	return find_if (ini,fin,not1(if_));
}


/** 
 * @brief Finds a pair of elements that are out of place (ie.: the second one is "less" than the first).
 * @return Iterator pointing to the first such element, or @a fin if none.
 * @xrefitem cxxo-sup-algorithm "" "Sorting"
 * 
 * For example, for the following example @c find_inversion will return an iterator pointing to the element 6:
................................................................................

 * @endcode
 * 
 * See also: @c fix_inversion().
 * 
**/
template <typename Iter, typename Less> inline
Iter find_inversion (Iter ini, Iter fin, Less lt) {
    using namespace std;
    for (; ini != fin && next(ini,1) != fin; ++ini) {
        Iter inext= ini; ++inext;
        if (fin != inext && lt(*inext,*ini)) break;
    }
    return ini;
}

template <typename Iter> inline
Iter find_inversion (Iter ini, Iter fin) {
    std::less<typename Iter::value_type> m;
................................................................................
    }
    return ret;
}

} // .detail::

/**
 * @brief Finds the latest item in a sequence that fits predicate @c if_ .
 * @param ini,fin Delimiters to the sequence to be examined.
 * @param if_ A predicate (a function from <var>ini...fin</var>'s alue type to @c bool ).
 * @return An iterator pointing to the latest item in <code>[ini,fin)</code> that fulfills @c if_ .
 * @anchor find_last_if
 */
template <typename Iter, typename Pred>
Iter find_last_if (Iter ini, Iter fin, Pred if_) {
    const typename std::iterator_traits<Iter>::iterator_category cat;
    return detail::find_last_if(ini, fin, if_, cat);
}


//! count_while proposal
//! https://groups.google.com/a/isocpp.org/forum/?fromgroups#!topic/std-proposals/bXrQrkBw59c
template <class InputIterator, class UnaryPredicate>
typename std::iterator_traits<InputIterator>::difference_type
................................................................................
 * family of <code>_n</code> functions such as <code>transform_n</code>.
 * 
 * Interfaces defined here:
 * 
 * * @c valcmp() - compares two values in the way strcmp, memcmp do.
 * * @c copy_leftmost_n() , @c copy_rightmost_n () - copies from either end of a sequence.
 * * @c count_while() - counts elements in a sequence.
 * * @c find_not() , @c find_if_not() - complements to @c find() , from p1223.
 * * @c find_inversion() - finds elements out of place in a sequence.
 * * @c find_last_if() - finds elements matching a predicate.
 * * @c transform_inplace() , @c transform_inplace_if() - transforms sequences in-place.
 * * @c transform_n() - transforms sequences.
 * * @c count_frequencies_map() , @c count_frequencies() - gathers data frequency in a sequence.
 * * @c relative_search() - finds element ranges matching a differential.
 * * @c lfv2::erase(), lfv2::erase_if() from Fundamentals V2 - simplified erase-remove idiom for sequence containers.

Changes to cxxomfort/cxxomfort/library/numeric.hpp.

223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
    static const T value = F<T, t0, t1>::value;
};
*/

} // ctmath

} // numeric::
} // library::
}



#else
	// unsupported
#endif // CXX_STD








|
<







223
224
225
226
227
228
229
230

231
232
233
234
235
236
237
    static const T value = F<T, t0, t1>::value;
};
*/

} // ctmath

} // numeric::
} } // cxxomfort::library




#else
	// unsupported
#endif // CXX_STD

Changes to cxxomfort/cxxomfort/library/string.hpp.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 * @xrefitem cxxo-sup-string "<string>" "Header"
 *
 */

#include <cxxomfort/base.hpp>
#include <cxxomfort/functional.hpp> // functors, binders, placeholders
#include <cxxomfort/string.hpp>


#if (CXXOMFORT_CXX_STD>=1997)

#include <cstring>
#include <string>
#include <sstream>
#include <cxxomfort/algorithm.hpp>







<







5
6
7
8
9
10
11

12
13
14
15
16
17
18
 * @xrefitem cxxo-sup-string "<string>" "Header"
 *
 */

#include <cxxomfort/base.hpp>
#include <cxxomfort/functional.hpp> // functors, binders, placeholders
#include <cxxomfort/string.hpp>


#if (CXXOMFORT_CXX_STD>=1997)

#include <cstring>
#include <string>
#include <sstream>
#include <cxxomfort/algorithm.hpp>

Changes to cxxomfort/cxxomfort/library/type_name.hpp.

4
5
6
7
8
9
10
11
12
13
14
15
16


17
18
19
20
21
22



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44




45
46
47
48
49
50
51
..
53
54
55
56
57
58
59



60
61
62
63













64
65
66
67
68

69
70
71
72
73
74
75
76
77


78





79
80
81
82
83
84
85
86
87
..
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/**
 * @file
 * @brief Implementation of type-naming utilities for cxxomfort.
 */

#include <cxxomfort/base.hpp>
#include <cxxomfort/config.hpp>
#include <typeinfo>
#include <type_traits> // remove_reference, etc
#include "../util/type_traits.hpp"
#include "../type_traits.hpp"
#include <string>
#include "../string_view.hpp"


#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
    #include <cxxabi.h>
#endif
//#include <iostream> // debug only

namespace cxxomfort {



namespace library {
namespace detail_demangle {

// Thanks much to ′灵魂L.眼神 for making me notice this had to be made static!
static std::string job (const char* name) {
#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
    char buf[1024];
    size_t size=sizeof(buf);
    int status;
    char* res = abi::__cxa_demangle (name,
                                 buf,
                                 &size,
                                 &status);
    buf[sizeof(buf) - 1] = 0;
    return std::string(res);
#else
    return name;
#endif
}


} //detail_demangle::





/**
 * @brief Demangle a @c typeid() expression if demangling is available
 * @ingroup cxxo-sup
 * @return A demangled version of a <code>typeid(...)</code> return, if available.
 **/
#if (CXXOMFORT_CXX_STD>=1997)
................................................................................
    return detail_demangle::job( ti.name() );
}
#else
static inline std::string_view typeid_demangle (std::type_info const& ti) {
	return ti.name();
}
#endif



/**
 * @brief Demangle a typename, recovering information about const / volatile too.
 * @ingroup cxxo-sup
 * @return A string containing a type name depending on the type @a T used to instantiate the function.













 */

template <typename T>
std::string_view type_name () CXXO_NOEXCEPTNOTHROW {
    using namespace std;

#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC)
    string_view S (__FUNCSIG__);
    // from "...type_name<TYPE_WE_WANT>(void) throw"
    size_t nend= S.rfind(">(void)");
    S= S.substr(119, nend-119);

#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC)
    string_view S (__PRETTY_FUNCTION__);
    //std::cout<< "["<< S<< "]"<< std::endl;


    size_t rend = (CXXOMFORT_CXX_STD >= 2017 ? 50UL : (CXXOMFORT_COMPILER_VERSION > 404 ? 80UL : 1UL));





    size_t lpos = static_cast<size_t>(S.find("with T = ")+9UL);
    size_t rpos = static_cast<size_t>((S.end() - rend) - S.begin());
    S= S.substr(lpos, rpos-lpos);

#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
	string_view S (__PRETTY_FUNCTION__);
	#if (CXXOMFORT_COMPILER_VERSION<500)
		S= S.substr(54, S.size()-54-1);
	#endif
................................................................................
#else
    string_view S (typeid(T).name());
#endif
    return S;
}


template <typename T>
std::string type_name_old () CXXO_NOEXCEPTNOTHROW {
    using namespace std;
    typedef typename remove_reference<T>::type TnR;
    std::string r( typeid_demangle(typeid(T)) );
//#if (CXXOMFORT_COMPILER_ID == CXXO_COMPILERID_MSC)
//    #pragma warning (disable:4127) // conditional expression is constant
//#endif
    if (is_const<TnR>::value) { r+= " const"; }
    if (is_volatile<TnR>::value) { r+= " volatile"; }
    if (is_lvalue_reference<T>::value) { r+= "&"; }
    if (is_rvalue_reference<T>::value) { r+= "&&"; }
//#if (CXXOMFORT_COMPILER_ID == CXXO_COMPILERID_MSC)
//    #pragma warning (default:4127)
//#endif
    return r;
}

} // library

// should this be deprecated in the future?
using library::type_name;
using library::typeid_demangle;

} // cxxomfort

#endif








|
|

<

<
>
>

|



|
>
>
>
|




|



|
<
<
<









>
>
>
>







 







>
>
>



|
>
>
>
>
>
>
>
>
>
>
>
>
>





>









>
>
|
>
>
>
>
>

|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











4
5
6
7
8
9
10
11
12
13

14

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
..
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
...
116
117
118
119
120
121
122

















123
124
125
126
127
128
129
130
131
132
133
/**
 * @file
 * @brief Implementation of type-naming utilities for cxxomfort.
 */

#include <cxxomfort/base.hpp>
#include <cxxomfort/config.hpp>
#include <cxxomfort/type_traits.hpp> // remove_reference, etc
#include <cxxomfort/string_view.hpp>
#include "../util/type_traits.hpp"

#include <string>

// #include <typeinfo> // user now has to include it explicitly

#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC || CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
	#define CXXO_has_cxx_demangle 1
#endif
//#include <iostream> // debug only

#ifdef CXXO_has_cxx_demangle
    #include <cxxabi.h>
#endif

namespace cxxomfort { namespace library {
namespace detail_demangle {

// Thanks much to ′灵魂L.眼神 for making me notice this had to be made static!
static std::string job (const char* name) {
#ifdef CXXO_has_cxx_demangle
    char buf[1024];
    size_t size=sizeof(buf);
    int status;
    char* res = abi::__cxa_demangle (name, buf, &size, &status);



    buf[sizeof(buf) - 1] = 0;
    return std::string(res);
#else
    return name;
#endif
}


} //detail_demangle::
} }


namespace cxxomfort { namespace library {

/**
 * @brief Demangle a @c typeid() expression if demangling is available
 * @ingroup cxxo-sup
 * @return A demangled version of a <code>typeid(...)</code> return, if available.
 **/
#if (CXXOMFORT_CXX_STD>=1997)
................................................................................
    return detail_demangle::job( ti.name() );
}
#else
static inline std::string_view typeid_demangle (std::type_info const& ti) {
	return ti.name();
}
#endif



/**
 * @brief Demangle a typename, recovering information about const / volatile too.
 * @ingroup cxxo-sup
 * @return An implementation-defined string containing a type name depending on the type @a T used to instantiate the function.
 * 
 * Example usage:
 * 
 * @code

#include <typeinfo>
#include <cxxomfort/library/type_name.hpp>

...

cout<< cxxomfort::library::type_name<int>()<< endl;

 * @endcode
 */

template <typename T>
std::string_view type_name () CXXO_NOEXCEPTNOTHROW {
    using namespace std;

#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC)
    string_view S (__FUNCSIG__);
    // from "...type_name<TYPE_WE_WANT>(void) throw"
    size_t nend= S.rfind(">(void)");
    S= S.substr(119, nend-119);

#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_GCC)
    string_view S (__PRETTY_FUNCTION__);
    //std::cout<< "["<< S<< "]"<< std::endl;
    #if (CXXOMFORT_CXX_STD>= 2017)
	size_t prefixend= 50UL;
	#elif (CXXOMFORT_COMPILER_VERSION>404)
	size_t prefixend= 105UL;
	#else
	size_t prefixend= 1;
	#endif

    size_t lpos = static_cast<size_t>(S.find("with T = ")+9UL);
    size_t rpos = static_cast<size_t>((S.end() - prefixend) - S.begin());
    S= S.substr(lpos, rpos-lpos);

#elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
	string_view S (__PRETTY_FUNCTION__);
	#if (CXXOMFORT_COMPILER_VERSION<500)
		S= S.substr(54, S.size()-54-1);
	#endif
................................................................................
#else
    string_view S (typeid(T).name());
#endif
    return S;
}




















} // library

// should this be deprecated in the future?
using library::type_name;
using library::typeid_demangle;

} // cxxomfort

#endif

Changes to cxxomfort/cxxomfort/string_view.hpp.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
37
38
39
40
41
42
43
44
45
46
47
48

49
50
51
52
53
54
55
#include "impl/17-string_view.hpp"
//#include "impl/17-hash_string_view.hpp"

namespace std {
    using cxxomfort::cxxostd::basic_string_view;
    using cxxomfort::cxxostd::string_view;
    using cxxomfort::cxxostd::wstring_view;
#if (CXXOMFORT_CXX_STD >= 2011)
    using cxxomfort::cxxostd::u16string_view;
    using cxxomfort::cxxostd::u32string_view;
#endif
}

#if (CXXOMFORT_CXX_STD>=1997)
	#include <string>

namespace cxxomfort { namespace fix {

/**
 * @brief Creates a view of a std::string.
 * */
template <typename Char, typename CT>
................................................................................
template <typename Char, size_t N>
std::basic_string_view<Char> make_string_view (Char const(&arr)[N]) {
    return std::basic_string_view<Char> (arr, N);
}

} } // cxxomfort::fix

#endif


#else // C++<1997
#endif

#endif

/**
 * @page std0string_view <string_view>
 * @brief Backports from <string_view>
 * 
 * Interfaces defined here:







|


|


|
|







 







|


|

>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "impl/17-string_view.hpp"
//#include "impl/17-hash_string_view.hpp"

namespace std {
    using cxxomfort::cxxostd::basic_string_view;
    using cxxomfort::cxxostd::string_view;
    using cxxomfort::cxxostd::wstring_view;
	#if (CXXOMFORT_CXX_STD >= 2011)
    using cxxomfort::cxxostd::u16string_view;
    using cxxomfort::cxxostd::u32string_view;
	#endif
}

	#if (CXXOMFORT_CXX_STD>=1997)
		#include <string>

namespace cxxomfort { namespace fix {

/**
 * @brief Creates a view of a std::string.
 * */
template <typename Char, typename CT>
................................................................................
template <typename Char, size_t N>
std::basic_string_view<Char> make_string_view (Char const(&arr)[N]) {
    return std::basic_string_view<Char> (arr, N);
}

} } // cxxomfort::fix

	#endif


#else // 0 && C++<1997
#endif

#endif

/**
 * @page std0string_view <string_view>
 * @brief Backports from <string_view>
 * 
 * Interfaces defined here:

Changes to cxxomfort/cxxomfort/system_error.hpp.

3
4
5
6
7
8
9






10
11
12
13
14
15
16
...
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
...
504
505
506
507
508
509
510


511
512
513
514
515
516
517
518
519
520
521
/**
 * @file
 * @xrefitem std0system_error "<system_error>" "Header"
 * 
 */

#if (CXXOMFORT_CXX_STD>=2011)







#elif (CXXOMFORT_CXX_STD>=1997)

/*
 * MSVC 2010 has a broken <system_error> that defines errc inside a 
 * namespace also called errc, making it impossible to 
 * declare variables of type std::errc.
................................................................................
class error_condition {
    public:
    error_condition () CXXO_NOEXCEPTNOTHROW 
    : v_error(0), p_category( &generic_category() ) 
    {}

    CXXO_DEFAULT_COPY_CONSTRUCTOR(error_condition, CXXO_NOTHROW, 
    v_error(v.v_error), p_category(v.p_category) );

    error_condition ( int val, error_category const& cat ) CXXO_NOEXCEPTNOTHROW
    : v_error(val), p_category(std::addressof(cat))
    {};

    // DMC does not support SFINAE-esques in member template it seems
#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_DMC)
................................................................................
 * @brief Aliases a broken @c std::errc implementation (as a namespace rather than as a type) in MSVC 2010.
 * 
 * */
#ifdef DOXYGEN_DOC
enum class errc {};
#endif



#if (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,>=1600) && CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC, <1800))
using ::std::errc::errc;
#else
using ::std::errc;
#endif


/**
 * @brief Creates a value of type @c errc given a numeric error code.
 * 
 * */







>
>
>
>
>
>







 







|







 







>
>
|


|







3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
...
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
/**
 * @file
 * @xrefitem std0system_error "<system_error>" "Header"
 * 
 */

#if (CXXOMFORT_CXX_STD>=2011)

#include <system_error>

namespace cxxomfort { namespace fix {
	using std::errc;
} }

#elif (CXXOMFORT_CXX_STD>=1997)

/*
 * MSVC 2010 has a broken <system_error> that defines errc inside a 
 * namespace also called errc, making it impossible to 
 * declare variables of type std::errc.
................................................................................
class error_condition {
    public:
    error_condition () CXXO_NOEXCEPTNOTHROW 
    : v_error(0), p_category( &generic_category() ) 
    {}

    CXXO_DEFAULT_COPY_CONSTRUCTOR(error_condition, CXXO_NOTHROW, 
    v_error(From.v_error), p_category(From.p_category) );

    error_condition ( int val, error_category const& cat ) CXXO_NOEXCEPTNOTHROW
    : v_error(val), p_category(std::addressof(cat))
    {};

    // DMC does not support SFINAE-esques in member template it seems
#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_DMC)
................................................................................
 * @brief Aliases a broken @c std::errc implementation (as a namespace rather than as a type) in MSVC 2010.
 * 
 * */
#ifdef DOXYGEN_DOC
enum class errc {};
#endif

#if (CXXOMFORT_CXX_STD>=2011)
using std::errc;
#elif (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,>=1600) && CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC, <1800))
using ::std::errc::errc;
#else
using std::errc;
#endif


/**
 * @brief Creates a value of type @c errc given a numeric error code.
 * 
 * */

Changes to cxxomfort/cxxomfort/type_traits.hpp.

7
8
9
10
11
12
13















14
15
16
17
18















19
20
21



22









23
24
25
26
27
28
29
30
31
32
33
34
..
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
...
133
134
135
136
137
138
139


140
141
142
143
144
145
146
147
148
...
202
203
204
205
206
207
208

209

210
211
212
213
214
215
216
...
441
442
443
444
445
446
447




448
449
450
451
452
453
454
455
456

457
458
459
460






...

461
462
463
464
465
466
467
468
469
470
471
472
473
 * @xrefitem std0type_traits "" ""
 * 
 */

#include "config.hpp"
#include "base.hpp"
















// we need to find a <type_traits> header. In GCC,
// we depend on a wrapper like tr1_fwd set up to enable us
// to directly include the header
#include <type_traits>
















#include "impl/11-conditional.hpp"
#include "util/type_traits.hpp"
#include "util/meta.hpp" // enable_if etc













#if (defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1))
#pragma message CXXO_NOTICE("enabled <type_traits> support.")
#endif

#include "impl/using_tr1_type_traits.hpp"

#if (CXXOMFORT_CXX_STD>=1997)


/*
 * TR1 traits missing in c++03 in implementations
 * is_literal_type, is_trivial, etc
................................................................................
    struct is_rvalue_reference { static const bool value = false; };

}
#endif
#undef CXXO_MIRROR_LVALUE_REFERENCE


#include "impl/11-decay.hpp"
#include "impl/11-underlying_type.hpp"
#include "impl/11-common_type.hpp"
#include "impl/11-is_tn_xble.hpp"

/*
 * is_trivial, is_literal
 * 
 * */
/*
 * is_trivial, is_literal_type
 */
#if (CXXOMFORT_CXX_STD < 2011)

    // for is_trivial is_literal
    #if 0
    #elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
        #if (CXXOMFORT_CXX_STD < 2011)
        #define CXXO_enable_is_trivial 1
        #define CXXO_has_trivial_intrinsic 1
................................................................................
        #define CXXO_has_trivial_intrinsic 1
        #define CXXO_has_literal_intrinsic 1
        #endif
        
    #elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC)
        #if (CXXOMFORT_COMPILER_VERSION>=1600)
        #define CXXO_enable_is_trivial 0 // already available


        #else
        #define CXXO_enable_is_trivial 1 // but check intrinsic
        #endif
        #if (CXXOMFORT_COMPILER_VERSION>1600)
        #define CXXO_enable_is_literal 0
        #else
        #define CXXO_enable_is_literal 1
        #endif
    #endif
................................................................................
 * bool_constant (c++17)
 */
#include "impl/17-bool_constant.hpp"

/*
 * endian (c++20)
 */

#include "impl/20-endian.hpp"



//
// is_trivially_... missing in GCC 4.7 despite announcing C++11 mode
//

#if (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_GCC , < 404) && CXXOMFORT_CXX_EMULATION==2011)
................................................................................
#if (defined(CXXO_needs_is_null_pointer))
namespace std {
    using ::cxxomfort::traits::is_null_pointer;
}
#endif







// is_destructible
#if (CXXOMFORT_CXX_STD >= 2011) \
|| CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,>=1700)
#else
namespace std {

    template <typename T>
    struct is_destructible

    : integral_constant<bool, (is_pod<T>::value || is_class<T>::value) && !is_void<T>::value > {
    };

}






................................................................................

#endif

// is_standard_layout
#if (CXXOMFORT_CXX_STD < 2011) 
    #if \
    (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,<1600)) || \
    (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_GCC,>0) && 0==CXXOMFORT_CXX_EMULATION)
        #define CXXO_needs_standard_layout
    #endif
#endif

#ifdef CXXO_needs_standard_layout
namespace std {







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
<
>
>
>
|
>
>
>
>
>
>
>
>
>




<







 







<
<
<
<








|







 







>
>
|
|







 







>

>







 







>
>
>
>




|




>
|
|


>
>
>
>
>
>
 
>





|







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

68
69
70
71
72
73
74
...
133
134
135
136
137
138
139




140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
...
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
...
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
...
512
513
514
515
516
517
518
519
520
521
522
523
524
525
 * @xrefitem std0type_traits "" ""
 * 
 */

#include "config.hpp"
#include "base.hpp"

#if (CXXOMFORT_CXX_STD>=2014)
	#include <type_traits>
#elif (CXXOMFORT_CXX_STD>=2011)
	#include <type_traits>

#elif (CXXOMFORT_CXX_STD>=1997 && CXXO_COMPILER_SUPPORT_tr1_type_traits>0)
	
	// 
	// compilers that at least take some decent c++03
	// 
	
	#include "impl/11-conditional.hpp"
	#include "util/type_traits.hpp"
	#include "util/meta.hpp" // enable_if etc

	// we need to find a <type_traits> header. In GCC,
	// we depend on a wrapper like tr1_fwd set up to enable us
	// to directly include the header
	#include <type_traits>

	#include "impl/using_tr1_type_traits.hpp"


	#include "impl/11-decay.hpp"
	#include "impl/11-underlying_type.hpp"
	#include "impl/11-common_type.hpp"
	#include "impl/11-is_tn_xble.hpp"

#else // CXX_STD < 1997

	// 
	// compilers that don't hae <type_traits>; 
	// here we only include a minimum subset of traits
	//
	
	#include "impl/11-conditional.hpp"
	#include "util/type_traits.hpp" // at least the basic traits

	#if (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC)
		#include <cxxomfort/config/msc/type_traits>
	#endif
	
	#include "impl/11-decay.hpp"
	#include "impl/11-is_tn_xble.hpp"


#endif // CXX_STD
	



#if (defined(CXXOMFORT_NOTICES) && (CXXOMFORT_NOTICES > 1))
#pragma message CXXO_NOTICE("enabled <type_traits> support.")
#endif



#if (CXXOMFORT_CXX_STD>=1997)


/*
 * TR1 traits missing in c++03 in implementations
 * is_literal_type, is_trivial, etc
................................................................................
    struct is_rvalue_reference { static const bool value = false; };

}
#endif
#undef CXXO_MIRROR_LVALUE_REFERENCE







/*
 * is_trivial, is_literal
 * 
 * */
/*
 * is_trivial, is_literal_type
 */
#if (CXXOMFORT_CXX_STD>=1997 && CXXOMFORT_CXX_STD < 2011)

    // for is_trivial is_literal
    #if 0
    #elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_CLANG)
        #if (CXXOMFORT_CXX_STD < 2011)
        #define CXXO_enable_is_trivial 1
        #define CXXO_has_trivial_intrinsic 1
................................................................................
        #define CXXO_has_trivial_intrinsic 1
        #define CXXO_has_literal_intrinsic 1
        #endif
        
    #elif (CXXOMFORT_COMPILER_ID==CXXO_COMPILERID_MSC)
        #if (CXXOMFORT_COMPILER_VERSION>=1600)
        #define CXXO_enable_is_trivial 0 // already available
        #elif (CXXOMFORT_COMPILER_VERSION>=1400)
        #define CXXO_enable_is_trivial 1 // but check intrinsic
        #else // MSVC 2003?
        #define CXXO_enable_is_trivial 0
        #endif
        #if (CXXOMFORT_COMPILER_VERSION>1600)
        #define CXXO_enable_is_literal 0
        #else
        #define CXXO_enable_is_literal 1
        #endif
    #endif
................................................................................
 * bool_constant (c++17)
 */
#include "impl/17-bool_constant.hpp"

/*
 * endian (c++20)
 */
#if (CXXOMFORT_CXX_STD>=2011 || CXXO_COMPILER_SUPPORT_tr1_type_traits)
#include "impl/20-endian.hpp"
#endif


//
// is_trivially_... missing in GCC 4.7 despite announcing C++11 mode
//

#if (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_GCC , < 404) && CXXOMFORT_CXX_EMULATION==2011)
................................................................................
#if (defined(CXXO_needs_is_null_pointer))
namespace std {
    using ::cxxomfort::traits::is_null_pointer;
}
#endif


// 
// traits from here on require at least C++03 TR1 <type_traits> support
// 


// is_destructible
#if (CXXOMFORT_CXX_STD >= 2011) \
|| CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,>=1700)
#elif (CXXO_COMPILER_SUPPORT_tr1_type_traits)
namespace std {

    template <typename T>
    struct is_destructible
    : integral_constant<bool, 
    (is_pod<T>::value || is_class<T>::value) && !is_void<T>::value > 
    {};

}
#else
namespace std {
	template <typename T>
	struct is_destructible 
	: integral_constant<bool, (is_fundamental<T>::value && !(is_void<T>::value))> {} ;
}
................................................................................

#endif

// is_standard_layout
#if (CXXOMFORT_CXX_STD < 2011) 
    #if \
    (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,>=1500) && CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_MSC,<1600)) || \
    (CXXO_COMPILERVERSION_COMPARE(CXXO_COMPILERID_GCC,>0) && 0==CXXOMFORT_CXX_EMULATION)
        #define CXXO_needs_standard_layout
    #endif
#endif

#ifdef CXXO_needs_standard_layout
namespace std {

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

544
545
546
547
548
549
550




551
552
553
554
555
556
557

558
559
560
561
562
563
564
: helper::conditional< __is_union(T), true_type, false_type>::type {};


// is_abstract
template <typename T> struct is_abstract
: helper::conditional< __is_abstract(T), true_type, false_type>::type {};





// is_polymorphic
template <typename T> struct is_polymorphic
: helper::conditional< __is_polymorphic(T), true_type, false_type>::type {};

// is_pod
template <typename T> struct is_pod
: helper::conditional< __is_pod(T), true_type, false_type>::type {};



/*
 * Advanced type properties
 */

// given the above, it should be possible to 







>
>
>
>







>







544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
: helper::conditional< __is_union(T), true_type, false_type>::type {};


// is_abstract
template <typename T> struct is_abstract
: helper::conditional< __is_abstract(T), true_type, false_type>::type {};

// is_base_of
template <typename B, typename D> struct is_base_of
: helper::conditional< __is_base_of(B,D), true_type, false_type>::type {};

// is_polymorphic
template <typename T> struct is_polymorphic
: helper::conditional< __is_polymorphic(T), true_type, false_type>::type {};

// is_pod
template <typename T> struct is_pod
: helper::conditional< __is_pod(T), true_type, false_type>::type {};



/*
 * Advanced type properties
 */

// given the above, it should be possible to 

Changes to cxxomfort/tags/cxxomfort.cpp.tags.

20
21
22
23
24
25
26


27
28
29
30
31
32
33
34
35
36

37
38
39
40
41
42
43
type_name|std::string_view|<T>() [parametrized on T]|
#algorithm
copy_leftmost_n|ItDest|(ItSrc ini, ItSrc fin, Integer n, ItDest dest)|
copy_rightmost_n|ItDest|(ItSrc ini, ItSrc fin, Integer n, ItDest dest)|
count_frequencies_map|Iterator|(Iterator ini, Iterator fin, ValueMapIndex[]& v)|
find_inversion|Iterator|(Iterator ini, Iterator fin, Comparison less)|
find_last_if|Iterator|(Iterator ini, Iterator fin, Predicate f)|


transform_inplace|Iterator|(Iterator ini, Iterator fin, Function f)|
transform_inplace_if|Iterator|(Iterator ini, Iterator fin, Function f, Predicate p)|
transform_n|Iterator|(Iterator ini, Integer n, DestIterator out, Function f)|
#functional
ptr_fun|nullary_functor|(Ret(*fn)())|
make_equivalence|equivalent_to<void>|()|
#iterator
ssize|ptrdiff_t|(Object&)|
make_fake_iterator|fake_iterator|(T const& t)|
#memory

#numeric
to_signed|signed T|(T t)|
to_unsigned|unsigned T|(T t)|
static_minmax|with.[min_value,max_value]|<T... args>|
static_clamp|with.[value]|<T... args>|
#random
random_global_engine|default_random_engine&|()|







>
>










>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
type_name|std::string_view|<T>() [parametrized on T]|
#algorithm
copy_leftmost_n|ItDest|(ItSrc ini, ItSrc fin, Integer n, ItDest dest)|
copy_rightmost_n|ItDest|(ItSrc ini, ItSrc fin, Integer n, ItDest dest)|
count_frequencies_map|Iterator|(Iterator ini, Iterator fin, ValueMapIndex[]& v)|
find_inversion|Iterator|(Iterator ini, Iterator fin, Comparison less)|
find_last_if|Iterator|(Iterator ini, Iterator fin, Predicate f)|
find_not|Iterator|(Iterator ini, Iterator fin, Value t)|
find_if_not|Iterator|(Iterator ini, Iterator fin, Predicate f)|
transform_inplace|Iterator|(Iterator ini, Iterator fin, Function f)|
transform_inplace_if|Iterator|(Iterator ini, Iterator fin, Function f, Predicate p)|
transform_n|Iterator|(Iterator ini, Integer n, DestIterator out, Function f)|
#functional
ptr_fun|nullary_functor|(Ret(*fn)())|
make_equivalence|equivalent_to<void>|()|
#iterator
ssize|ptrdiff_t|(Object&)|
make_fake_iterator|fake_iterator|(T const& t)|
#memory
to_bool|bool|(unique_ptr<T> const& resource)|
#numeric
to_signed|signed T|(T t)|
to_unsigned|unsigned T|(T t)|
static_minmax|with.[min_value,max_value]|<T... args>|
static_clamp|with.[value]|<T... args>|
#random
random_global_engine|default_random_engine&|()|