[kudu-CR] build: don't instantiate const objects with no user-defined constructor

2018-11-20 Thread Andrew Wong (Code Review)
Andrew Wong has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/11971 )

Change subject: build: don't instantiate const objects with no user-defined 
constructor
..

build: don't instantiate const objects with no user-defined constructor

It seems that some compilers disallow instantiating const objects that
don't provide a user-provided constructor. This would surface as the
following error.

error: default initialization of an object of const type 'const ClusterInfo' 
requires a user-provided default constructor

Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Reviewed-on: http://gerrit.cloudera.org:8080/11971
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin 
---
M src/kudu/tools/rebalance_algo-test.cc
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/11971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Gerrit-Change-Number: 11971
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)


[kudu-CR] build: don't instantiate const objects with no user-defined constructor

2018-11-20 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11971 )

Change subject: build: don't instantiate const objects with no user-defined 
constructor
..


Patch Set 3: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc
File src/kudu/tools/rebalance_algo-test.cc:

http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc@294
PS1, Line 294:  const ClusterInf
> Actually thinking about this more, I was curious why this was the case and
Yep, that looked suspicious since at line 304 there is similar construct and it 
worked.  Thank you for looking at it again.



--
To view, visit http://gerrit.cloudera.org:8080/11971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Gerrit-Change-Number: 11971
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Nov 2018 03:56:00 +
Gerrit-HasComments: Yes


[kudu-CR] build: don't instantiate const objects with no user-defined constructor

2018-11-20 Thread Andrew Wong (Code Review)
Hello Alexey Serbin, Kudu Jenkins, Adar Dembo,

I'd like you to reexamine a change. Please visit

http://gerrit.cloudera.org:8080/11971

to look at the new patch set (#3).

Change subject: build: don't instantiate const objects with no user-defined 
constructor
..

build: don't instantiate const objects with no user-defined constructor

It seems that some compilers disallow instantiating const objects that
don't provide a user-provided constructor. This would surface as the
following error.

error: default initialization of an object of const type 'const ClusterInfo' 
requires a user-provided default constructor

Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
---
M src/kudu/tools/rebalance_algo-test.cc
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/71/11971/3
--
To view, visit http://gerrit.cloudera.org:8080/11971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Gerrit-Change-Number: 11971
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)


[kudu-CR] build: don't instantiate const objects with no user-defined constructor

2018-11-20 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11971 )

Change subject: build: don't instantiate const objects with no user-defined 
constructor
..


Patch Set 2: Code-Review+2


--
To view, visit http://gerrit.cloudera.org:8080/11971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Gerrit-Change-Number: 11971
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Nov 2018 01:07:19 +
Gerrit-HasComments: No


[kudu-CR] build: don't instantiate const objects with no user-defined constructor

2018-11-20 Thread Andrew Wong (Code Review)
Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11971 )

Change subject: build: don't instantiate const objects with no user-defined 
constructor
..


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc
File src/kudu/tools/rebalance_algo-test.cc:

http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc@294
PS1, Line 294:  ClusterInfo info
> I'm curious whether the following (more idiomatic) would help here:
It doesn't; that's actually the first thing I tried :/


http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc@324
PS1, Line 324:   ClusterInfo info;
> ditto
Ack



--
To view, visit http://gerrit.cloudera.org:8080/11971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Gerrit-Change-Number: 11971
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Nov 2018 01:03:03 +
Gerrit-HasComments: Yes


[kudu-CR] build: don't instantiate const objects with no user-defined constructor

2018-11-20 Thread Andrew Wong (Code Review)
Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11971 )

Change subject: build: don't instantiate const objects with no user-defined 
constructor
..


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11971/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/11971/1//COMMIT_MSG@7
PS1, Line 7: object
> It's not a class member though; it's just a local instantiation.
Done



--
To view, visit http://gerrit.cloudera.org:8080/11971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Gerrit-Change-Number: 11971
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Nov 2018 01:02:01 +
Gerrit-HasComments: Yes


[kudu-CR] build: don't instantiate const objects with no user-defined constructor

2018-11-20 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11971 )

Change subject: build: don't instantiate const objects with no user-defined 
constructor
..


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc
File src/kudu/tools/rebalance_algo-test.cc:

http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc@294
PS1, Line 294:  ClusterInfo info
I'm curious whether the following (more idiomatic) would help here:

const Cluster info = {};


http://gerrit.cloudera.org:8080/#/c/11971/1/src/kudu/tools/rebalance_algo-test.cc@324
PS1, Line 324:   ClusterInfo info;
ditto



--
To view, visit http://gerrit.cloudera.org:8080/11971
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia21baed51e035d9005453fd7d08274c9c23e74d7
Gerrit-Change-Number: 11971
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Nov 2018 01:01:48 +
Gerrit-HasComments: Yes