Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about static-cast

Read more about static-cast

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - static-cast

Passing 'this' pointer to a static method in a parent class

I am writing an embedded application using freeRTOS and I'm trying to do it in a neat, object-oriented fashion. To start a FreeRTOS task from within an object, you need to give it a static function. I...
test-img

user13989581

c++

oop

inheritance

static-methods

static-cast

Votes: 0

Answers: 1

Latest Answer

Declaring a virtual loop function in BaseMode worked. Forgot these even existed.
test-img

user13989581

Relying on compiler optimization of multiple static cast calls?

I'm working with a code base where I see the following lines of code auto a = static_cast<custom_type*>(obj.get())->a(); auto b = static_cast<custom_type*>(obj.get())->b(); aut...
test-img

student010101

c++

optimization

static-cast

Votes: 0

Answers: 2

Latest Answer

static_cast<T> is not a function. Depending on the relationship between custom_type* and decltype(obj.get()), and whether a, b or c are virtual, there might be no trace of it in the resulting ob...
test-img

Caleth

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved