Tuple isn't being constructed in order?

前端 未结 2 1443
半阙折子戏
半阙折子戏 2020-12-19 07:37

The following program:

#include 
#include 

struct A {
    A() { std::cout << \"A constructor\\n\"; }
};

struct B {
    B         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-19 08:27

    std::tuple construction order is currently unspecified.

    A proposal for a concrete decision on its order has been submitted to the committee but until then the order should not be relied on.

提交回复
热议问题