Top "Return-type" questions

is for questions dealing with the type of the variable or value returned by a function.

C# Overload return type - recommended approach

I have a situation where I just want the return type to be different for a method overload, but you …

c# .net overloading return-type
The body of constexpr function not a return-statement

In the following program, I have added an explicit return statement in func(), but the compiler gives me the following …

c++ function c++11 constexpr return-type
How can I return an anonymous struct in C?

Trying some code, I realized that the following code compiles: struct { int x, y; } foo(void) { } It seems as if …

c struct return-value c99 return-type
Java Unchecked Overriding Return Type

I have a project that has the following components: public abstract class BaseThing { public abstract <T extends BaseThing> …

java generics polymorphism abstract-class return-type