Skip to content

Commit 77fce67

Browse files
authored
Merge pull request #237 from robotpy/upgrades-and-remove-constexpr
Upgrades and remove constexpr from signature
2 parents 106e39d + 6e9f18d commit 77fce67

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

robotpy_build/autowrap/cxxparser.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
ClassBlockState,
2424
ExternBlockState,
2525
NamespaceBlockState,
26+
NonClassBlockState,
2627
)
2728
from cxxheaderparser.tokfmt import tokfmt
2829
from cxxheaderparser.types import (
@@ -31,6 +32,7 @@
3132
ClassDecl,
3233
Concept,
3334
DecoratedType,
35+
DeductionGuide,
3436
EnumDecl,
3537
Field,
3638
ForwardDecl,
@@ -1272,6 +1274,11 @@ def on_class_end(self, state: AWClassBlockState) -> None:
12721274
for m in cdata.defer_private_nonvirtual_methods:
12731275
self._on_class_method_process_overload_only(state, m)
12741276

1277+
def on_deduction_guide(
1278+
self, state: NonClassBlockState, guide: DeductionGuide
1279+
) -> None:
1280+
pass
1281+
12751282
#
12761283
# Function/method processing
12771284
#

robotpy_build/autowrap/generator_data.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,13 @@ def _get_function_signature(self, fn: Function) -> str:
326326
signature = f"{signature} [const]"
327327
else:
328328
signature = "[const]"
329-
elif fn.constexpr:
330-
if signature:
331-
signature = f"{signature} [constexpr]"
332-
else:
333-
signature = "[constexpr]"
329+
330+
# constexpr and non-constexpr cannot be overloaded, so don't include it
331+
# elif fn.constexpr:
332+
# if signature:
333+
# signature = f"{signature} [constexpr]"
334+
# else:
335+
# signature = "[constexpr]"
334336

335337
return signature
336338

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ install_requires =
2727
setuptools_scm >= 6.2, < 8
2828
sphinxify >= 0.7.3
2929
pydantic >= 1.7.0, < 2
30-
cxxheaderparser[pcpp] ~= 1.2
30+
cxxheaderparser[pcpp] ~= 1.4.1
3131
tomli
3232
tomli_w
3333
toposort

0 commit comments

Comments
 (0)