Skip to content

Commit a96cdac

Browse files
committed
Fixup #2
1 parent 7b54c40 commit a96cdac

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/mrdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ implementation-defined:
1515
- 'mrdocs::dom::detail'
1616
exclude-symbols:
1717
- 'boost::describe'
18+
- 'boost::describe:**'
1819
multipage: true
1920
generator: adoc
2021
cmake: '-D MRDOCS_DOCUMENTATION_BUILD=ON'

include/mrdocs/Metadata/Symbol/EnumToString.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,24 @@
2121
namespace mrdocs {
2222

2323
/** Convert a Boost.Describe'd enumerator to string form.
24+
25+
@param e The enumerator to convert.
26+
@return The string form of the enumerator.
2427
*/
2528
template <typename Enum>
2629
requires std::is_enum_v<Enum>
30+
&& boost::describe::has_describe_enumerators<Enum>
2731
std::string
28-
toString(Enum e) noexcept
32+
toString(Enum e)
2933
{
3034
std::string result;
3135
boost::mp11::mp_for_each<
3236
boost::describe::describe_enumerators<Enum>>(
3337
[&](auto const& D)
3438
{
35-
using Descriptor = std::decay_t<decltype(D)>;
36-
if (Descriptor::value == e)
39+
if (D.value == e)
3740
{
38-
result = toKebabCase(Descriptor::name);
41+
result = toKebabCase(D.name);
3942
}
4043
});
4144

0 commit comments

Comments
 (0)