@@ -14,7 +14,19 @@ Initial code based on blog post by Bastian Rieck,
1414see: https://bastian.rieck.me/blog/posts/2017/simple_unit_tests/
1515
1616# Requirements
17- This library requires at least C++11 and has been tested on Linux Mint 20.
17+ This library requires ** C++11** or later and has been tested on Linux Mint 20 and other modern Linux distributions.
18+
19+ ** Key C++11 features used:**
20+ - Lambda expressions
21+ - ` auto ` keyword for type deduction
22+ - Uniform initialization syntax (` {} ` )
23+ - ` std::enable_if ` for SFINAE
24+ - ` std::chrono ` for timing
25+ - ` nullptr ` and ` std::nullptr_t `
26+ - ` static_assert ` for compile-time checks
27+ - ` decltype ` for type deduction
28+
29+ The library is fully compatible with C++11, C++14, C++17, and C++20 standards.
1830
1931# Project home
2032https://github.com/vpiotr/utest
@@ -58,6 +70,24 @@ cmake -DUTEST_BUILD_DEMO=OFF -DUTEST_BUILD_TESTS=ON ..
5870
5971# Integration
6072
73+ ## C++11 Compatibility
74+
75+ This library is fully compatible with C++11 and later standards. To use it in your project, ensure your compiler supports C++11:
76+
77+ ``` cmake
78+ # In your CMakeLists.txt
79+ set(CMAKE_CXX_STANDARD 11)
80+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
81+ ```
82+
83+ Or with compiler flags:
84+ ``` bash
85+ g++ -std=c++11 your_tests.cpp
86+ clang++ -std=c++11 your_tests.cpp
87+ ```
88+
89+ The library leverages modern C++11 features for clean, expressive test code while maintaining compatibility with older codebases.
90+
6191## Method 1: Direct inclusion
6292
6393Simply copy ` include/utest.h ` into your project and include it.
@@ -332,5 +362,25 @@ void test_lambdas() {
332362}
333363```
334364
365+ ## Compatibility Notes
366+
367+ ### C++11 Features Used
368+ The library takes advantage of several C++11 features to provide clean, modern syntax:
369+
370+ - ** Lambda expressions** : For exception testing and complex test scenarios
371+ - ** Auto keyword** : For type deduction in test code
372+ - ** Uniform initialization** : For cleaner object construction
373+ - ** std::chrono** : For high-precision timing measurements
374+ - ** nullptr** : For safe null pointer testing
375+ - ** static_assert** : For compile-time type checking
376+ - ** SFINAE with decltype** : For template metaprogramming
377+
378+ ### Compiler Support
379+ Tested with:
380+ - GCC 4.8+ (C++11 support)
381+ - Clang 3.3+ (C++11 support)
382+ - MSVC 2013+ (C++11 support)
383+ - Any compiler with full C++11 support
384+
335385# License
336386See LICENSE.txt
0 commit comments