| Files | Last commit | Last update |
|---|---|---|
Add template class constraints and comprehensive usage guide Co-authored-by: dzheng<dzheng@localhost> | 5 months ago | |
Add template class constraints and comprehensive usage guide Co-authored-by: dzheng<dzheng@localhost> | 5 months ago | |
Initial commit: cppcompat header-only C++17/C++20 compatibility framework Provides a macro + thin-wrapper layer that lets a single source base compile cleanly under both -std=c++17 and -std=c++20 without #ifdef clutter. Headers (include/compat/): detail/std_detect.hpp — standard & compiler detection attributes.hpp — [[nodiscard]], [[likely]], [[no_unique_address]], … constexpr.hpp — consteval, constinit, constexpr-virtual/dtor concepts.hpp — CPPCOMPAT_CONCEPT, CPPCOMPAT_REQUIRES, built-ins traits.hpp — 3-layer custom trait framework (DEFINE/DETECT/APPLY) compare.hpp — spaceship operator / CPPCOMPAT_DEFINE_ORDERED format.hpp — std::format with __has_include guard + snprintf fallback span.hpp — std::span alias (C++20) / minimal built-in (C++17) ranges.hpp — std::ranges macros + cppcompat::ranges:: wrappers compat.hpp — umbrella include Examples (examples/): basic_attributes, concepts_constraints, ordering, span_ranges, traits_usage — compile and produce identical output on both standards Build system: CMakeLists.txt with -DCPPCOMPAT_STD=17|20 selection .clangd + compile_flags.txt for IDE support scripts/use_clang17.sh to configure update-alternatives Documentation: DESIGN.md covering all macro design decisions and rationale Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> | 8 months ago | |
Initial commit: cppcompat header-only C++17/C++20 compatibility framework Provides a macro + thin-wrapper layer that lets a single source base compile cleanly under both -std=c++17 and -std=c++20 without #ifdef clutter. Headers (include/compat/): detail/std_detect.hpp — standard & compiler detection attributes.hpp — [[nodiscard]], [[likely]], [[no_unique_address]], … constexpr.hpp — consteval, constinit, constexpr-virtual/dtor concepts.hpp — CPPCOMPAT_CONCEPT, CPPCOMPAT_REQUIRES, built-ins traits.hpp — 3-layer custom trait framework (DEFINE/DETECT/APPLY) compare.hpp — spaceship operator / CPPCOMPAT_DEFINE_ORDERED format.hpp — std::format with __has_include guard + snprintf fallback span.hpp — std::span alias (C++20) / minimal built-in (C++17) ranges.hpp — std::ranges macros + cppcompat::ranges:: wrappers compat.hpp — umbrella include Examples (examples/): basic_attributes, concepts_constraints, ordering, span_ranges, traits_usage — compile and produce identical output on both standards Build system: CMakeLists.txt with -DCPPCOMPAT_STD=17|20 selection .clangd + compile_flags.txt for IDE support scripts/use_clang17.sh to configure update-alternatives Documentation: DESIGN.md covering all macro design decisions and rationale Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> | 8 months ago | |
Initial commit: cppcompat header-only C++17/C++20 compatibility framework Provides a macro + thin-wrapper layer that lets a single source base compile cleanly under both -std=c++17 and -std=c++20 without #ifdef clutter. Headers (include/compat/): detail/std_detect.hpp — standard & compiler detection attributes.hpp — [[nodiscard]], [[likely]], [[no_unique_address]], … constexpr.hpp — consteval, constinit, constexpr-virtual/dtor concepts.hpp — CPPCOMPAT_CONCEPT, CPPCOMPAT_REQUIRES, built-ins traits.hpp — 3-layer custom trait framework (DEFINE/DETECT/APPLY) compare.hpp — spaceship operator / CPPCOMPAT_DEFINE_ORDERED format.hpp — std::format with __has_include guard + snprintf fallback span.hpp — std::span alias (C++20) / minimal built-in (C++17) ranges.hpp — std::ranges macros + cppcompat::ranges:: wrappers compat.hpp — umbrella include Examples (examples/): basic_attributes, concepts_constraints, ordering, span_ranges, traits_usage — compile and produce identical output on both standards Build system: CMakeLists.txt with -DCPPCOMPAT_STD=17|20 selection .clangd + compile_flags.txt for IDE support scripts/use_clang17.sh to configure update-alternatives Documentation: DESIGN.md covering all macro design decisions and rationale Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> | 8 months ago | |
cmake: default to libc++ when compiling with Clang libc++ is co-designed with Clang, offering faster template instantiation, better concept diagnostics, and — critically — std::format availability on clang-17 without requiring GCC 13's libstdc++. New cache variable: CPPCOMPAT_STDLIB (libc++ | libstdc++) - Defaults to libc++ when CMAKE_CXX_COMPILER_ID matches Clang - Defaults to libstdc++ for GCC and other compilers - Override: cmake -DCPPCOMPAT_STDLIB=libstdc++ .. - Adds -stdlib=libc++ -lc++abi when libc++ is selected Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> | 8 months ago | |
Initial commit: cppcompat header-only C++17/C++20 compatibility framework Provides a macro + thin-wrapper layer that lets a single source base compile cleanly under both -std=c++17 and -std=c++20 without #ifdef clutter. Headers (include/compat/): detail/std_detect.hpp — standard & compiler detection attributes.hpp — [[nodiscard]], [[likely]], [[no_unique_address]], … constexpr.hpp — consteval, constinit, constexpr-virtual/dtor concepts.hpp — CPPCOMPAT_CONCEPT, CPPCOMPAT_REQUIRES, built-ins traits.hpp — 3-layer custom trait framework (DEFINE/DETECT/APPLY) compare.hpp — spaceship operator / CPPCOMPAT_DEFINE_ORDERED format.hpp — std::format with __has_include guard + snprintf fallback span.hpp — std::span alias (C++20) / minimal built-in (C++17) ranges.hpp — std::ranges macros + cppcompat::ranges:: wrappers compat.hpp — umbrella include Examples (examples/): basic_attributes, concepts_constraints, ordering, span_ranges, traits_usage — compile and produce identical output on both standards Build system: CMakeLists.txt with -DCPPCOMPAT_STD=17|20 selection .clangd + compile_flags.txt for IDE support scripts/use_clang17.sh to configure update-alternatives Documentation: DESIGN.md covering all macro design decisions and rationale Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> | 8 months ago | |
Add template class constraints and comprehensive usage guide Co-authored-by: dzheng<dzheng@localhost> | 5 months ago | |
Initial commit: cppcompat header-only C++17/C++20 compatibility framework Provides a macro + thin-wrapper layer that lets a single source base compile cleanly under both -std=c++17 and -std=c++20 without #ifdef clutter. Headers (include/compat/): detail/std_detect.hpp — standard & compiler detection attributes.hpp — [[nodiscard]], [[likely]], [[no_unique_address]], … constexpr.hpp — consteval, constinit, constexpr-virtual/dtor concepts.hpp — CPPCOMPAT_CONCEPT, CPPCOMPAT_REQUIRES, built-ins traits.hpp — 3-layer custom trait framework (DEFINE/DETECT/APPLY) compare.hpp — spaceship operator / CPPCOMPAT_DEFINE_ORDERED format.hpp — std::format with __has_include guard + snprintf fallback span.hpp — std::span alias (C++20) / minimal built-in (C++17) ranges.hpp — std::ranges macros + cppcompat::ranges:: wrappers compat.hpp — umbrella include Examples (examples/): basic_attributes, concepts_constraints, ordering, span_ranges, traits_usage — compile and produce identical output on both standards Build system: CMakeLists.txt with -DCPPCOMPAT_STD=17|20 selection .clangd + compile_flags.txt for IDE support scripts/use_clang17.sh to configure update-alternatives Documentation: DESIGN.md covering all macro design decisions and rationale Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> | 8 months ago |
Project README is empty