https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86135
--- Comment #9 from Sabetay Toros <sabetaytoros at gmail dot com> --- I´ve examined your link. This is not the same case as you are stating. I am not initializing a vector with an initializer list, rather I am trying to initialize only one object member with a universal initialiazer. And all modern C++ books suggest not to use C++98 style initiliazers, just because they are confusing. After constructing the object I am putting to a vector. This is very very simple case. And besides what is your solution to this issue. How the user will be able to find that kind of errors. In these cases gcc must not give a runtime error message but compiler error message. On Wed, Jun 13, 2018 at 9:00 PM, redi at gcc dot gnu.org < gcc-bugzi...@gcc.gnu.org> wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86135 > > --- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- > http://en.cppreference.com/w/cpp/language/list_initialization#Notes shows > a > similar example, demonstrating the different behaviour for initializer_list > constructors. std::vector has an initializer-list constructor, so trying to > move-construct a vector<object_t> when object_t can be constructed from > std::vector<object_t> will result in infinite recursion. > > This special case only applies to list-initialization, because it's > related to > constructors taking a std::initializer_list. It's totally wrong to say that > list-init and direct-init must do the same thing in the presence of > initializer-list constructors. If they did the same thing there would have > been > no need to introduce list-initialization syntax in the first place. > > -- > You are receiving this mail because: > You reported the bug. >