On Monday, 4 April 2016 08:13:14 UTC+3,
hbdev...@gmail.com wrote:
> Hi all,
>
> In the code below, an assignment operator is used on the second line in main function.
> I am curious to see how the initializer_list assignment operator looks like but I can't find its code in the STL library.
> The class definition in /usr/include/c++/5/initializer_list does not provide any assignment operator.
>
> Could anyone please tell me in which file it is defined ?
As legacy from C the C++ compiler makes assignment operators implicitly
for structs/classes when it is not explicitly done by user.
Besides that 'std::initializer_list' is a "magical" class and so not all
of its behavior is possible to implement as library code.