bugGNU Octave - Bugs: bug #53280, Eliminate C++0X workarounds now...

 
 

bug #53280: Eliminate C++0X workarounds now that C++11 is required

Submitter:  Dildar Sk <hodor123456>
Submitted:  Sun 04 Mar 2018 10:51:13 AM UTC
   
 
Category:  Libraries Severity:  2 - Minor
Priority:  3 - Low Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Dildar Sk Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 26 Jan 2019 02:39:26 AM UTC, comment #3: 

Here is an updated grep of the current development branch for all relevant mentions of either C++0X or C++11. These are not all labeled with "FIXME" currently, but from the context of the comments they all appear to mention doing some kind of rewrite or refactor.


libinterp/corefcn/call-stack.cc-44-
libinterp/corefcn/call-stack.cc-45-// Use static fields for the best efficiency.
libinterp/corefcn/call-stack.cc:46:// NOTE: C++0x will allow these two to be merged into one.
libinterp/corefcn/call-stack.cc-47-static const char *bt_fieldnames[] =
libinterp/corefcn/call-stack.cc-48-  { "file", "name", "line", "column", "scope", "context", nullptr };
--
libinterp/corefcn/gcd.cc-58-// Don't use the Complex and FloatComplex typedefs because we need to
libinterp/corefcn/gcd.cc-59-// refer to the actual float precision FP in the body (and when gcc
libinterp/corefcn/gcd.cc:60:// implements template aliases from C++0x, can do a small fix here).
libinterp/corefcn/gcd.cc-61-template <typename FP>
libinterp/corefcn/gcd.cc-62-static void
--
libinterp/corefcn/pr-output.cc-2600-{
libinterp/corefcn/pr-output.cc-2601-  // FIXME: this mostly duplicates the code in the print_nd_array<>
libinterp/corefcn/pr-output.cc:2602:  // function.  Can fix this with std::is_same from C++11.
libinterp/corefcn/pr-output.cc-2603-
libinterp/corefcn/pr-output.cc-2604-  if (nda.isempty ())
--
libinterp/corefcn/pr-output.cc-2837-{
libinterp/corefcn/pr-output.cc-2838-  // FIXME: this mostly duplicates the code in the print_nd_array<>
libinterp/corefcn/pr-output.cc:2839:  // function.  Can fix this with std::is_same from C++11.
libinterp/corefcn/pr-output.cc-2840-
libinterp/corefcn/pr-output.cc-2841-  if (nda.isempty ())
--
libinterp/parse-tree/jit-ir.h-292-    jit_use (void) : m_user (0), m_index (0) { }
libinterp/parse-tree/jit-ir.h-293-
libinterp/parse-tree/jit-ir.h:294:    // we should really have a move operator, but not until c++11 :(
libinterp/parse-tree/jit-ir.h-295-    jit_use (const jit_use& use) : m_user (0), m_index (0)
libinterp/parse-tree/jit-ir.h-296-    {
--
liboctave/array/Array.h-852-  NoAlias () : ArrayClass () { }
liboctave/array/Array.h-853-
liboctave/array/Array.h:854:  // FIXME: this would be simpler once C++0x is available
liboctave/array/Array.h-855-  template <typename X>
liboctave/array/Array.h-856-    explicit NoAlias (X x) : ArrayClass (x) { }


Mike Miller <mtmiller>
Group Member
Mon 05 Mar 2018 04:53:06 PM UTC, comment #2: 

Actually, this isn't just a documentation bug.  On the development branch C++11 is now required.  Any references to C++0X should be fixed, and then the FIXME notes removed.

Using grep I find three instances of C++0X that need resolution.


array/Array.h:898:  // FIXME: this would be simpler once C++0x is available
corefcn/call-stack.cc:37:// NOTE: C++0x will allow these two to be merged into one.
corefcn/gcd.cc:60:// implements template aliases from C++0x, can do a small fix here).


I will try to get this added to the OctConf 2018 agenda for one of the code sprints.


Rik <rik5>
Group administrator
Sun 04 Mar 2018 11:31:58 AM UTC, comment #1: 

Here I am submitting a patch.

(file #43459)

Dildar Sk <hodor123456>
Sun 04 Mar 2018 10:51:13 AM UTC, original submission:  

There is a file Array.h in octave/liboctave/Array/.
I think that file is written in C++ 0x standard,but at the end of that file there is written "FIXME: this would be simpler once C++0x is available".So it is pretty confusing.If it still doesn't follow C++ 0x standard then we also should change it because C++ 0x is available from a long ago.

Dildar Sk <hodor123456>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #43459:  doc.patch added by hodor123456 (657B - text/x-patch)
file #43457:  error C++ 0x.png added by hodor123456 (117KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hodor123456 (Submitted the item)
  • -email is unavailable- added by hodor123456
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-26 mtmiller CategoryConfiguration and Build System Libraries
        Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        Item GroupOther Feature Request
    2018-03-05 rik5 CategoryDocumentation Configuration and Build System
        Item GroupDocumentation Other
        StatusNone Confirmed
        Release4.2.1 dev
        SummaryConfusing documentation. Eliminate C++0X workarounds now that C++11 is required
    2018-03-04 hodor123456 Attached File- Added doc.patch, #43459
    2018-03-04 hodor123456 Attached File- Added error C++ 0x.png, #43457
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code