On Tue, Mar 16, 2021 at 11:24 PM Gregory Nutt <spudan...@gmail.com> wrote:
> > >> I had to change my file names, from cpp to cxx. Is it mandatory to > >> change the file extension to use C++? > >> > > No, .cxx is just the default extension. You can change the default value > in > > Makefile like this: > > CXXEXT=.cpp > > But this feature just exists in Makefile under the apps folder. > > Again, the coding standard does currently require the .cxx extension: > https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#cplusplus > > I would consider that up for discussion and subject to community > concurrence. Which ever is selected, the extension should be used > consistently. All C++ files under apps follow the coding standard for > file naming EXCEPT for some ELF loadable modules and some test-releated > files that are currently in violation of the coding standard: > > ./examples/elf/tests/helloxx/hello++1.cpp > ./examples/elf/tests/helloxx/hello++2.cpp > ./examples/elf/tests/helloxx/hello++3.cpp > ./examples/elf/tests/helloxx/hello++4.cpp > ./examples/elf/tests/helloxx/hello++5.cpp > ./examples/nxflat/tests/hello++/hello++1.cpp > ./examples/nxflat/tests/hello++/hello++2.cpp > ./examples/nxflat/tests/hello++/hello++3.cpp > ./examples/nxflat/tests/hello++/hello++4.cpp > ./testing/irtest/cmd.cpp > ./testing/irtest/enum.cpp > ./testing/irtest/main.cpp > > All these sources can change to .cxx suffix. > We do require strong motivation before any changes are made to the > coding stardard. We want to avoid the case where the coding standard is > changed to meet the preferences a single person or a single > organization. Any changes must have a broad community mandate. > > CXXEXT is for code which doesn't plan to be upstreamed. Actually, after joining Apache, I don't think we can freely include 3rd party code into repo like before even with the compatible license and not in active development. So