Commit Graph

28 Commits

Author SHA1 Message Date
Martchus 53ce099bf9 Apply clang-format 2023-01-28 18:49:54 +01:00
Martchus 9d59ab5c29 Fix Traits::IsSpecializationOf for references
This check is also supposed to work for references so use the same approach
as for ignoring cv qualifiers.
2020-06-17 21:41:00 +02:00
Martchus c7c5352325 Use a universal reference to implement dereferenceMaybe() 2020-02-18 19:20:24 +01:00
Martchus 16103c0662 Add missing <string> include in traits header 2020-01-01 16:38:04 +01:00
Martchus 46bebace20 Consider std::basic_string_view a string in Traits::IsString
* Fix e.g. using std::string_view with CppUnit and
  the tests/testutils.h header
* Fix documentation
* Possibly a source incompatible change in some rare uses but
  not worth a major version bump
2019-11-28 22:32:47 +01:00
Martchus b48b2f5c06 Have everything in one top-level namespace 2019-06-10 21:56:46 +02:00
Martchus 44e4d1335a Fix Traits::IsSpecializationOf to ignore cv qualifier
So eg. const/volatile std::string is also considered a
specialization of std::basic_string like one would expect.
2018-10-29 23:16:16 +01:00
Martchus cad2977e4e Add Traits::HasOperatorBool 2018-10-21 20:21:28 +02:00
Marius Kittler 5e74deccf3 Document all traits 2018-07-10 13:17:26 +02:00
Marius Kittler 9743dc7d28 Improve dereferenceMaybe()
* Support smart-pointers and other types which can
  be dereferenced
* Add tests
* Add documentation
2018-07-10 13:17:04 +02:00
Martchus 236309971d Add dereferenceMaybe() 2018-07-01 23:22:33 +02:00
Martchus 27d5041e06 Add Traits::IsSpecializingAnyOf 2018-06-24 20:13:41 +02:00
Martchus 0fb92e3685 Add Traits::None 2018-06-23 14:33:00 +02:00
Martchus 30adb1bc47 Add Traits::IsResizable 2018-06-20 23:07:08 +02:00
Martchus e4bf7142f5 Add Traits::Is{Any,None}Of 2018-06-20 23:07:08 +02:00
Martchus 2264ea5cf2 Add trait to check whether type is complete 2017-11-16 02:00:03 +01:00
Martchus 39f69f94d7 Make CPP_UTILITIES_TRAITS_DEFINE_TYPE_CHECK usabe from any ns 2017-11-06 21:28:09 +01:00
Martchus 9fb347db24 Add generic macro for defining (custom) type checks 2017-11-01 15:19:28 +01:00
Martchus fa39e2a1aa Add traits to check for reserve() and size() 2017-10-27 18:25:32 +02:00
Martchus e52fd5a4af Apply tidy after updating to clang-format 5.0.0
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:45:23 +02:00
Martchus 3b74b817ec Add trait to test for strings 2017-05-10 23:31:28 +02:00
Martchus f827c2be00 Add trait to check whether type is iteratable 2017-05-08 19:51:24 +02:00
Martchus db46948f2f Apply clang-format 2017-05-04 22:44:15 +02:00
Martchus 59e20b1043 Apply clang-format 2017-05-01 03:13:11 +02:00
Martchus 94a6b47811 Improve documentation 2017-02-03 00:54:44 +01:00
Martchus df1605c9b1 Add trait to detect template specialization
Useful to check for std::tuple
2017-01-30 00:08:35 +01:00
Martchus 5eec3c3c9b traits: Fix Any and add Enable-/DisableIfAny 2017-01-27 18:49:53 +01:00
Martchus bd9cdfccb2 Add traits for exploiting SFINAE 2016-11-13 22:51:09 +01:00