Commit Graph

71 Commits

Author SHA1 Message Date
Peter Dimov
4959611e09 Avoid msvc-14.0 constexpr errors in enum_to_string 2025-12-15 19:39:46 +02:00
Peter Dimov
dfd9182bf3 Replace the lambda in enum_to_string with a struct to enable C++14 constexpr. Refs #60. Refs #61. 2025-12-15 12:37:40 +02:00
Peter Dimov
f1774f3d02 Make enum_to_string constexpr; add enum_to_string_test_cx.cpp. Refs #60. Refs #61. 2025-12-15 12:28:44 +02:00
Peter Dimov
0a40d3b824 Move C++20 detection to detail/config.hpp; disable C++20 use for Clang < 13. 2025-11-14 23:10:11 +02:00
Peter Dimov
644a984a61 Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122688 2025-11-14 23:10:11 +02:00
Peter Dimov
43ee545507 Move enum descriptors computation into decltype under C++20. Fixes #58. 2025-11-14 23:10:11 +02:00
Peter Dimov
373db78411 Make mod_any_access an inline variable, because of modules. Closes #57. 2025-10-22 11:00:36 +03:00
sigbjorn
362a266b7d Extended limit for describe/detail/pp_for_each.hpp from 52 to 64 including test, #55 2025-08-08 10:52:00 +02:00
Quentin Chateau
2e63564776 Support parameter packs for bases in BOOST_DESCRIBE_CLASS 2024-03-22 22:47:46 +01:00
Peter Dimov
cfddb57d3a Add an overload of enum_from_string that takes a string-like type (such as string_view). Fixes #41. 2023-09-09 18:52:41 +03:00
Romain Geissler
b54fda5469 Fix -Wdeprecated warnings when compiling with C++ >= 17 (ie with inline variables).
Example of warning we get:
/data/mwrep/res/osp/Boost/23-0-0-0/include/boost/describe/members.hpp:89:81: error: redundant redeclaration of 'constexpr' static data member 'boost::describe::detail::update_modifiers<T, Bm>::fn<D>::pointer' [-Werror=deprecated]
 89 | template<class T, unsigned Bm> template<class D> constexpr decltype(D::pointer) update_modifiers<T, Bm>::fn<D>::pointer;
    | ^~~~~~~~~~~~~~~~~~~~~~~ /data/mwrep/res/osp/Boost/23-0-0-0/include/boost/describe/members.hpp:83:47: note: previous declaration of 'boost::describe::detail::update_modifiers<T, Bm>::fn<D>::pointer'
 83 | static constexpr decltype(D::pointer) pointer = D::pointer;
    | ^~~~~~~
2023-05-20 23:41:18 +00:00
Peter Dimov
7a06d512dc Move BOOST_DESCRIBE_ENUM(modifiers) to modifier_description.hpp, to allow modifiers.hpp inclusion under -pedantic 2022-10-28 06:28:16 +03:00
Peter Dimov
5d13049e06 Use __attribute__((unused)) instead of [[maybe_unused]]; earlier Clangs don't have [[maybe_unused]], and it's a pedantic warning before C++17 2022-10-28 05:29:31 +03:00
Peter Dimov
df0f16a85b Do not set BOOST_DESCRIBE_CXX11 for g++ 4.7, as its C++11 support is not good enough 2022-10-28 05:24:46 +03:00
Peter Dimov
6bf8045bac Disable warning 4100 under msvc-14.0 2022-10-20 18:27:14 +03:00
Peter Dimov
c156466e2b Fix operator test failures 2022-09-29 20:11:07 +03:00
Peter Dimov
4b65c35009 Remove extra semicolon in modifiers.hpp 2022-06-21 16:28:22 +03:00
Ed Catmur
acf2e56c34 Poison BOOST_DESCRIBE_ENUM in class scope
try to inform the user that they should use BOOST_DESCRIBE_NESTED_ENUM instead
2021-12-21 17:07:14 +00:00
Peter Dimov
f9477bc177 Disable operators for unions because their behavior is undefined 2021-12-15 02:00:20 +02:00
Peter Dimov
fabf5c7115 Allow unions in BOOST_DESCRIBE_STRUCT (refs #21) 2021-12-15 01:33:06 +02:00
Peter Dimov
fc458d48c7 Change internal functions to take T** instead of T* to prevent derived to base conversions (closes #22) 2021-12-11 19:28:16 +02:00
Ed Catmur
1fa144623d Sprinkle [[maybe_unused]] on descriptors
Suppresses Wunused-function / Wunneeded-internal-declaration (clang) on internal-linkage types

https://github.com/boostorg/describe/issues/23
2021-11-16 21:35:33 +00:00
Peter Dimov
84fe8aa21e Add descriptor_by_pointer 2021-10-27 06:09:54 +03:00
Peter Dimov
8437f2e62e Fix msvc-14.0 2021-10-27 04:31:35 +03:00
Peter Dimov
448174f346 Add descriptor_by_name 2021-10-27 04:13:29 +03:00
Peter Dimov
2accb05ce5 Reset os.width in operator<< 2021-10-26 17:32:21 +03:00
Peter Dimov
128e3667d6 Add operators.hpp 2021-10-26 07:09:30 +03:00
Peter Dimov
8cf28d7b6e Include enum_from_string.hpp in describe.hpp 2021-10-26 06:21:56 +03:00
Peter Dimov
c3f16f3332 Add enum_from_string.hpp 2021-10-26 05:33:14 +03:00
Peter Dimov
53d577428e Make enum_to_string noexcept 2021-10-26 04:12:58 +03:00
Peter Dimov
9c351a463f Add enum_to_string.hpp 2021-10-25 20:22:14 +03:00
Peter Dimov
300ea0bebe Add has_describe_members 2021-10-25 18:45:26 +03:00
Peter Dimov
5a4c425f32 Add has_describe_bases 2021-10-25 18:40:38 +03:00
Peter Dimov
b6c41956ec Add has_describe_enumerators 2021-10-25 17:36:58 +03:00
Peter Dimov
4a4dd302cb Add mod_any_member 2021-06-16 22:33:02 +03:00
Peter Dimov
94a80a6812 Add BOOST_DESCRIBE_NESTED_ENUM 2021-03-20 02:28:22 +02:00
Peter Dimov
62c032ff22 Add static_asserts in BOOST_DESCRIBE_ENUM and BOOST_DESCRIBE_STRUCT (fixes #8) 2021-03-17 16:42:58 +02:00
Peter Dimov
1bf6dddac0 Add a test for overloaded functions returning std::pair 2021-03-16 06:20:20 +02:00
Peter Dimov
564f849629 Use PP_NAME, PP_POINTER when describing members; add overloaded_test 2021-03-16 01:44:53 +02:00
Peter Dimov
ed26d4c495 Add BOOST_DESCRIBE_PP_NAME, BOOST_DESCRIBE_PP_POINTER 2021-03-16 01:21:20 +02:00
Peter Dimov
e15c09c848 Reenable BOOST_DESCRIBE_CXX14 for -std=c++14 on g++ 5, 6, 7 2021-03-14 06:49:02 +02:00
Peter Dimov
c9f780cbfb Allow trailing comma in enum descriptions and definitions 2021-03-14 06:47:14 +02:00
Peter Dimov
ae5c3c862f Add detail/pp_utilities.hpp 2021-03-14 06:30:01 +02:00
Peter Dimov
c6fa6f125e Fix handling of empty enums 2021-03-14 01:30:59 +02:00
Peter Dimov
ee415d4001 Rename internal classes from D to _boost_desc 2021-03-14 01:14:58 +02:00
Peter Dimov
f251e6f320 Add a boost prefix to descriptor functions 2021-03-14 01:00:45 +02:00
Peter Dimov
6f8e4c879b Remove BOOST_DESCRIBE_ENUM_CLASS; use BOOST_DESCRIBE_ENUM_BEGIN, BOOST_DESCRIBE_ENUM_ENTRY, BOOST_DESCRIBE_ENUM_END 2021-03-14 00:44:25 +02:00
Peter Dimov
a876e619b7 Use detail/compute_base_modifiers.hpp in detail/bases.hpp 2021-03-13 21:39:53 +02:00
Peter Dimov
109bb07163 Add detail/compute_base_modifiers.hpp 2021-03-13 21:23:27 +02:00
Peter Dimov
34edf8c4a1 Increase PP_FOR_EACH limit from 24 to 52 2021-03-13 18:56:06 +02:00