Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
2 answers
210 views

I have a situation similar to described in a blog post: a visible inline member function is called from several shared libraries which are built potentially with different compilers or compiler ...
1 vote
1 answer
51 views

Here is my simplified code: S.h class SBase { ... public: virtual std::vector<int32_t> getNumbersSet1(); virtual std::vector<int32_t> getNumbersSet2(); } class SDerived : public ...
15 votes
2 answers
811 views

I'm encountering unexpected behavior on MSVC when storing a pointer to a virtual method in a static inline variable. The issue does not occur on GCC or Clang. Specifically, when I store a pointer to a ...
3 votes
1 answer
81 views

I'm trying to create sort of an event system, I don't care if it is suboptimal, I'm doing it for fun. I do not want alternate solutions, I want to understand why this isn't working and how could I fix ...
-1 votes
2 answers
232 views

Here is the error in GCC (which i have already fixed): ISO C++ forbid taking the address of a bound member function to form a pointer to member function This is the error line of my code: threads[i] ...
8 votes
2 answers
198 views

Consider a base class with a couple of public fields and a derived class which inherits the base privately and makes one of the inherited fields public via the using declaration. I need to access this ...
-1 votes
1 answer
116 views

I recreated small example of a problem I'm seeing. I have two classes. Class Owner has a member variable, a. Class Client has a member variable which references the member variable a from the Owner ...
0 votes
0 answers
50 views

I think this question is related to C++ pointer to member of derived class, but slightly different. I have a class accepts a pointer-to-member as template parameter, and will deduct the holder's type ...
0 votes
2 answers
106 views

I am trying to port C code to a C++ program and thus encapsulate the logic from the C program inside a C++ class. The step I am stuck at is using a function pointer, which is a field inside a struct ...
0 votes
1 answer
89 views

A pointer to member function isn't a regular pointer. but a pointer to a pointer to member function does. struct X { void func() {} }; int main() { auto p1 = &X::func; auto p2 = &...
1 vote
1 answer
58 views

I'm trying to create a notebook program cpp file: #include <string> #include "Menu.h" class Notebook { std::vector<std::string> m_notes; public: void addNote() { ...
Svyat's user avatar
  • 79
1 vote
1 answer
127 views

class Harl { private: void debug( void ); void info( void ); void warning( void ); void error( void ); public: void complain( std::string level ); }; ...
1 vote
0 answers
56 views

I have to implement a low-level interface for the library which exposes structure with a function pointers like this: struct Interface { int (*IterfaceFn) (int value); }; Library then expects a ...
0 votes
1 answer
75 views

I have a class with overloaded method: #include <iostream> #include <utility> struct Overloads { void foo() { std::cout << "foo" << std::endl; } ...
2 votes
1 answer
86 views

I would like to have a base class that I derive from that offers serialization mechanism: template <typename Type, typename Class, Type Class::* Member> class Serializable { public: void ...

15 30 50 per page
1
2 3 4 5
...
70

AltStyle によって変換されたページ (->オリジナル) /