On Sunday, 30 September 2018 at 11:11:09 UTC, Nicholas Wilson
wrote:
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
Alex has mentioned Rebindable, which is the answer to your first
q
On Sunday, 30 September 2018 at 10:28:25 UTC, Alex wrote:
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
I think,
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
For example:
void main()
{
class Thing {}
class Th
On Sunday, 30 September 2018 at 09:16:42 UTC, Nicholas Wilson
wrote:
On Sunday, 30 September 2018 at 07:29:00 UTC, Vijay Nayar wrote:
Second question. const class variables may not be re-assigned,
so if you need a variable that may be reassigned, but may
never modify the underlying object, a
On Sunday, 30 September 2018 at 07:29:00 UTC, Vijay Nayar wrote:
I have two brief questions.
Code that uses "new" to create struct objects appears to
compile and run. Is this an actual language feature, to get
structs on the heap?
void main()
{
struct S {int data = 1;}
S* s1
On 30/09/2018 8:29 PM, Vijay Nayar wrote:
I have two brief questions.
Code that uses "new" to create struct objects appears to compile and
run. Is this an actual language feature, to get structs on the heap?
void main()
{
struct S {int data = 1;}
S* s1 = new S();
S* s2 = s1;