c++syntaxsymengine

Double curly braces in C++ constructor


What do the double curly braces in the following line of C++ code mean?

piranha::symbol_set ss({{piranha::symbol(detail::poly_print(var))}});

For context, this is from a file in the SymEngine code ("symengine/polys/uintpoly_piranha.h"), which can be found at the link below, as can the Piranha library which is used in the above line.

I know single curly braces are used as initializer lists, but the meaning of the double curly braces within the set of parentheses makes little sense to me.

The main thing I found on double curly braces was this post, but it does not seem applicable here.

Also, I apologize for linking source code like this but I am unsure of how to make a smaller example given my lack of understanding.

Thanks!


Solution

  • Curly braces can be used to describe

    So what actually happens in this line is: