# When UCLASS declared with "Const" cant declare BlueprintImplementableEvent. \[Bug?\]

**URL:** <https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780>\
**Category:** C++\
**Tags:** ufunction, unreal-engine, UE5-0, CPP\
**Created:** [September 6, 2022, 2:41pm UTC](https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780 "2022-09-06T14:41:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 6, 2022, 2:41pm UTC](https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780/1 "2022-09-06T14:41:49Z")

</div>

When UCLASS declared with “Const” cant declare BlueprintImplementableEvent. Because const added to function.

When you try, you get error.

> Error C2511 : ‘void UClassX::FunctionY(void) const’: overloaded member function not found in ‘FunctionY’  
> Error C2671 : ‘UClassX::FunctionY’: static member functions do not have ‘this’ pointers  
> Error C2352 : ‘UObject::FindFunctionChecked’: illegal call of non-static member function

---

<div class="post-metadata">

**Author:** ![akaPrometh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@akaPrometh](https://forums.unrealengine.com/u/akaPrometh)\
**Post date:** [September 22, 2022, 9:00am UTC](https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780/2 "2022-09-22T09:00:32Z")

</div>

Hi,  
Did you manage to solve the issue?  
I’m facing the same trying to subclass ‘UAnimNotifyState’.  
I removed the const, deleted the .generated stuff and still it adds const to my BlueprintImplementableEvent 😢

---

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 22, 2022, 9:12am UTC](https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780/3 "2022-09-22T09:12:33Z")

</div>

I think I’ve removed “const” from class declaration.

---

<div class="post-metadata">

**Author:** ![akaPrometh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@akaPrometh](https://forums.unrealengine.com/u/akaPrometh)\
**Post date:** [September 22, 2022, 12:53pm UTC](https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780/4 "2022-09-22T12:53:46Z")

</div>

Saddly that did not work for me (using UE 5.0.3).

But that may be because we have a different class inheritance.  
Posting my exp for anyone else that may profit in the future.  
I did remove ‘const’ from my class, but the class I inherit from (UAnimNotifyState) has ‘const’ too.  
‘Const’ is carried on childs no matter what. It also forces every BPImplementableEvent and BPNativeEvent to be const. It also forces every UProperty to be const. This likely infects BPCallable methods…

Possible solution:  
I could have gone and remove ‘const’ from the unreal’s class… but that’s a bit dirty.  
Or copy the entire unreal’s class and remove const from there. But meh.

Instead I just wrote my code in the cpp class. F\*k Blueprints anyway 😉

---

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 22, 2022, 2:03pm UTC](https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780/5 "2022-09-22T14:03:21Z")

</div>

Should we consider this as a bug?

---

<div class="post-metadata">

**Author:** ![akaPrometh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@akaPrometh](https://forums.unrealengine.com/u/akaPrometh)\
**Post date:** [September 27, 2022, 8:09am UTC](https://forums.unrealengine.com/t/when-uclass-declared-with-const-cant-declare-blueprintimplementableevent-bug/642780/6 "2022-09-27T08:09:44Z")

</div>

I dont think so.  
It is the expected behaviour of ‘const’.  
It’s just annoying that it is used here.
