0

I would like to remove the space after decltype( in the following SFINAE test:

template<typename C> static one test(typename std::remove_reference<decltype( &C::fromString)>::type);

Obviously, I don't want to lose spaces before ampersands in other cases like std::string &s or whatever.

Can anyone tell me which option governs this space?

Christian
  • 499
  • 6
  • 24
  • Are you sure it's not the space before the ampersand that you're seeing? Notice that the previous bracket doesn't show a space: `test(typename std...`. – Paul Oct 14 '19 at 12:52
  • Yes, it definitely only happens with ampersands. By saying "after decltype(" I didn't mean to say that this is responsible for the space, I was just pointing to the part of the relatively long line that I was talking about. – Christian Oct 14 '19 at 12:56
  • You may have to put up with that, though you may want to mention it to the developer, also. – Paul Oct 14 '19 at 12:59
  • 1
    Setting `sp_before_unnamed_byref` to `remove` does the right thing here but it also removes spaces as soon as you omit a parameter name in a function definition to avoid "unused" warnings. – Christian Oct 15 '19 at 09:33
  • Personally I don't see that as a problem. You may want to consider that all Linters are really just for guidance - so long as your code is legible and you stick to (at least) your own strictures, or those of the company you work for, you should be fine. Blind faith is an impracticality. – Paul Oct 15 '19 at 10:28

0 Answers0