Skip to main content

Questions tagged [overloading]

The terms overloading and overloaded may refer to: - Constructor and method overloading, a type of polymorphism where different functions with the same name are invoked based on the data types and number of the parameters passed - Operator overloading, a form of functional or method overloading where the action being overloaded is an operator, such as + or -

6 votes
3 answers
455 views

Background I'm trying to write a helper function for constructing repeating strings with a separator. ...
Felix ZY's user avatar
  • 183
1 vote
0 answers
162 views

Second revision of the original post: Function overloading / dynamic dispatch for Python TL;DR: Improved version of this library[^1] based on previous reviews and criticism. It provides runtime ...
HernanATN's user avatar
  • 369
5 votes
2 answers
1k views

UPDATE: Second revision on separate post. Runtime function overloading / dynamic dispatch for Python (2nd revision) When I first started using Python I had a rough time dealing with some of it's ...
HernanATN's user avatar
  • 369
-2 votes
1 answer
116 views

I've an object that looks like this, and users have been populating the attributes post-initialization, e.g. ...
alvas's user avatar
  • 709
5 votes
1 answer
305 views

I coded stuff for an embedded device where int is 24bits. I wanted to port uint24_t and ...
Vortex 2728182818's user avatar
5 votes
1 answer
253 views

C++23 is going to add multidimensional array subscript operators to the language, yippee! Alas, I have not yet come across a way to adapt them to types where the number of dimensions is templated, so ...
saxbophone's user avatar
1 vote
2 answers
213 views

I am learning the behavior of C++'s special member function, using a naive String class as example. (The code is modified from this tutorial) Here is the ...
Der Fänger im Roggen's user avatar
2 votes
1 answer
114 views

I'm gradually writing an arbitrary-precision arithmetic library for C++. I've decided it could be useful to have the default constructor produce an object of indeterminate value, rather than relying ...
saxbophone's user avatar
4 votes
1 answer
364 views

If you want to lexicographically compare two vectors in C++, you can simply write vec1 <=> vec2. But instead, if you want to compare them reversed, it is not ...
Sourav Kannantha B's user avatar
2 votes
2 answers
381 views

I have created a class Complex which represents a complex number of any arbitrary arithmetic type. Overloads are given for the 4 common functions, addition, ...
finlay morrison's user avatar
0 votes
1 answer
124 views

It's very basic. I'm learning C# and I want a method to print an array in a readable format. My array could be integers, doubles, or strings. I have implemented method overloading. From the fact that ...
tmo's user avatar
  • 33
12 votes
4 answers
2k views

I am trying to implement an optimal and fast running matrix in C++. I need some review of the code and ideas on how to improve the code quality if it shall be. ...
Hrant Nurijanyan's user avatar
1 vote
1 answer
313 views

I know this may be a silly question, but... is it really necessary to add the parameter name (int <parameter_name>), instead of just (int) in a definition of an operator function to overload &...
jr.çhåvez__07's user avatar
2 votes
1 answer
246 views

This is a follow-up question for Dictionary based non-local mean implementation in C++. There are some issues about operators (operator+ and ...
JimmyHu's user avatar
  • 7,575
4 votes
3 answers
1k views

I wanted to get my code reviewed as I have tried to implement a basic Money class to represent money values in c++. Can anyone tell me if I am implementing my basic arithmetic operator overloads ...
paigelarry342's user avatar

15 30 50 per page
1
2 3 4 5
8