1
votes

I use the Guidelines Support Library's gsl::span (from Neil Macintosh's implementation) - with the header located at /usr/local/src/gsl/include.

I also use nVIDIA nSight 9.2, i.e. Eclipse CDT version 8.4.0.nvidia-something. I've added the include folder as a CDT user entry under Project Settings | Build | C/C++ General | Preprocessor Include Paths, Macros etc. - but this doesn't effect the indexer, which ignores the file. Also, the syntax highligher doesn't like it because it doesn't have a .hpp/.h/.hxx prefix.

How can get the span header to be properly recognized?

1

1 Answers

1
votes

For the syntax highlighting issue, the following should fix it:

  • Go to Preferences | General | Content Types
  • Choose Text -> C Source File -> C++ Source File -> C++ Header File in "Content types"
  • Add the header name(s) to File associations

As for the indexer processing the header file, that should just work after adding it to Preprocessor Include Paths, Macros etc., I'm not sure why it doesn't. Sometimes, I have better luck using Path and Symbols instead.