Note that there are some explanatory texts on larger screens.

plurals
  1. POIs C++ showing its age as programmers try to use it in ways it was never designed to be used?
    primarykey
    data
    text
    <p><strong>Background</strong></p> <p>Using boost and other similar libraries is the easiest way to find compiler shortcomings, but is there a stage at which things go <em>too far</em>?</p> <p>This mangled symbol:</p> <pre><code>_ZTSN5boost6spirit2qi6detail13parser_binderINS1_11alternativeINS_6fusion4consINS1_8sequenceINS6_INS1_16lexeme_directiveINS7_INS6_INS1_6actionINS1_9referenceIKNS1_4ruleIN9__gnu_cxx17__normal_iteratorIPKcSsEEFN7xxxxxxx2ir8carry_op2OpEvENS5_11unused_typeESM_EEEENS_7phoenix5actorINSQ_9compositeINSQ_11assign_evalENS5_6vectorINS0_14local_variableILi0EEENS0_8argumentILi0EEENS5_5void_ESZ_SZ_SZ_SZ_SZ_SZ_SZ_EEEEEEEENS6_INS1_10char_classINS0_3tag9char_codeINS15_5spaceENS0_13char_encoding5asciiEEEEENS5_3nilEEEEEEEEENS6_INS9_INS7_INS6_INSA_IKNSB_ISG_FSbIwSt11char_traitsIwESaIwEEvENSH_6parser11white_spaceISG_EESM_EEEENS6_INS1_12literal_charINS18_8standardELb1ELb0EEENS6_IS1R_NS6_IS1U_NS6_IS1R_NS6_IS1U_NS6_IS1R_NS6_IS1U_NS6_IS1R_S1C_EEEEEEEEEEEEEEEEEEEENSR_INSS_IST_NSU_INS0_9attributeILi0EEENSS_INSQ_6detail14construct_evalISJ_EENSU_ISW_SY_NSX_ILi1EEENSX_ILi2EEENSX_ILi3EEENSX_ILi4EEESZ_SZ_SZ_SZ_EEEESZ_SZ_SZ_SZ_SZ_SZ_SZ_SZ_EEEEEEEES1C_EEEEEENS6_INS7_INS6_IS1G_NS6_INS9_INS7_INS6_IS1R_NS6_IS1U_NS6_IS1R_NS6_IS1U_NS6_IS1R_NS6_IS1U_NS6_IS1U_S1W_EEEEEEEEEEEEEEEENSR_INSS_IST_NSU_IS26_NSS_IS29_NSU_ISW_SY_S2A_S2B_NSQ_5valueINS_8optionalIS1K_EEEES2C_SZ_SZ_SZ_SZ_EEEESZ_SZ_SZ_SZ_SZ_SZ_SZ_SZ_EEEEEEEES1C_EEEEEENS6_INS7_INS6_IS1G_NS6_INS9_INS7_IS21_EENSR_INSS_IST_NSU_IS26_NSS_IS29_NSU_ISW_SY_S2A_S2B_S2C_S2Y_SZ_SZ_SZ_SZ_EEEESZ_SZ_SZ_SZ_SZ_SZ_SZ_SZ_EEEEEEEES1C_EEEEEES1C_EEEEEEEEN4mpl_5bool_ILb0EEEEE </code></pre> <p>(1,388 characters)</p> <p>Translates into (thanks c++filt!):</p> <pre><code>boost::spirit::qi::detail::parser_binder&lt;boost::spirit::qi::alternative&lt;boost::fusion::cons&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::action&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, xxxxxxx::ir::carry_op::Op ()(), boost::fusion::unused_type, boost::fusion::unused_type&gt; const&gt;, boost::phoenix::actor&lt;boost::phoenix::composite&lt;boost::phoenix::assign_eval, boost::fusion::vector&lt;boost::spirit::local_variable&lt;0&gt;, boost::spirit::argument&lt;0&gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::ascii&gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::action&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::nil&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;, boost::phoenix::actor&lt;boost::phoenix::composite&lt;boost::phoenix::assign_eval, boost::fusion::vector&lt;boost::spirit::attribute&lt;0&gt;, boost::phoenix::composite&lt;boost::phoenix::detail::construct_eval&lt;xxxxxxx::ir::carry_op&gt;, boost::fusion::vector&lt;boost::spirit::local_variable&lt;0&gt;, boost::spirit::argument&lt;0&gt;, boost::spirit::argument&lt;1&gt;, boost::spirit::argument&lt;2&gt;, boost::spirit::argument&lt;3&gt;, boost::spirit::argument&lt;4&gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::action&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, xxxxxxx::ir::carry_op::Op ()(), boost::fusion::unused_type, boost::fusion::unused_type&gt; const&gt;, boost::phoenix::actor&lt;boost::phoenix::composite&lt;boost::phoenix::assign_eval, boost::fusion::vector&lt;boost::spirit::local_variable&lt;0&gt;, boost::spirit::argument&lt;0&gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::ascii&gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::action&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::nil&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;, boost::phoenix::actor&lt;boost::phoenix::composite&lt;boost::phoenix::assign_eval, boost::fusion::vector&lt;boost::spirit::attribute&lt;0&gt;, boost::phoenix::composite&lt;boost::phoenix::detail::construct_eval&lt;xxxxxxx::ir::carry_op&gt;, boost::fusion::vector&lt;boost::spirit::local_variable&lt;0&gt;, boost::spirit::argument&lt;0&gt;, boost::spirit::argument&lt;1&gt;, boost::spirit::argument&lt;2&gt;, boost::phoenix::value&lt;boost::optional&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt; &gt;, boost::spirit::argument&lt;3&gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::lexeme_directive&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::action&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, xxxxxxx::ir::carry_op::Op ()(), boost::fusion::unused_type, boost::fusion::unused_type&gt; const&gt;, boost::phoenix::actor&lt;boost::phoenix::composite&lt;boost::phoenix::assign_eval, boost::fusion::vector&lt;boost::spirit::local_variable&lt;0&gt;, boost::spirit::argument&lt;0&gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::char_class&lt;boost::spirit::tag::char_code&lt;boost::spirit::tag::space, boost::spirit::char_encoding::ascii&gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, boost::fusion::cons&lt;boost::spirit::qi::action&lt;boost::spirit::qi::sequence&lt;boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::cons&lt;boost::spirit::qi::literal_char&lt;boost::spirit::char_encoding::standard, true, false&gt;, boost::fusion::cons&lt;boost::spirit::qi::reference&lt;boost::spirit::qi::rule&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; ()(), xxxxxxx::parser::white_space&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, boost::fusion::unused_type&gt; const&gt;, boost::fusion::nil&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;, boost::phoenix::actor&lt;boost::phoenix::composite&lt;boost::phoenix::assign_eval, boost::fusion::vector&lt;boost::spirit::attribute&lt;0&gt;, boost::phoenix::composite&lt;boost::phoenix::detail::construct_eval&lt;xxxxxxx::ir::carry_op&gt;, boost::fusion::vector&lt;boost::spirit::local_variable&lt;0&gt;, boost::spirit::argument&lt;0&gt;, boost::spirit::argument&lt;1&gt;, boost::spirit::argument&lt;2&gt;, boost::spirit::argument&lt;3&gt;, boost::phoenix::value&lt;boost::optional&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt; &gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt;, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_&gt; &gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt;, boost::fusion::nil&gt; &gt; &gt; &gt;, mpl_::bool_&lt;false&gt; &gt; </code></pre> <p>(12,980 characters)</p> <hr> <p><strong>Question</strong></p> <p>So my question is, in light of these (which technically don't pass the standard as I understand it, as the mangled name is over 1,024 characters), is this a sign that C++ is showing its age by not keeping up-to-date with the newest concepts? Or is it simply a sign that programmers are expecting too much from the language, and template libraries like boost are doing the best they can to facilitate this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload