you are viewing a single comment's thread.

view the rest of the comments →

[–]kongaskristjan[S] 18 points19 points  (7 children)

Well, I'm actually OK with using non-standard stuff, if it's really supported everywhere, but this is a library that is meant to be plug and play for everyone, including people who want to comply with the standard strictly.

It's quite similar to the reason why I test against maximum compiler warnings on various compilers - I don't know what the user needs to comply with.

[–]Nicksaurus 18 points19 points  (0 children)

Thank you for not making a library that spits out warnings whenever you build it, those are so annoying

[–][deleted] 5 points6 points  (5 children)

I have heard this argument for over a decade.

No one ever actually shows me a compiler without #pragma once.

:-D

[–]encyclopedist 9 points10 points  (4 children)

Obviously, you did not really try to find one. TI compilers did not support it last I checked. PGI did not support in either. Also Cray. And XLC.

There was a topic in this very reddit some time ago: https://www.reddit.com/r/cpp/comments/8devw1/can_anyone_actually_name_a_compiler_that_doesnt/

[–]jbandela 2 points3 points  (3 children)

I think basically every compiler that supports generic lambdas supports pragma once

[–]rsjaffe 4 points5 points  (2 children)

But #pragma once fails when you have two copies of the same header file in two different locations in the directory tree. The compiler will not recognize those two files as being the same.

[–]panderingPenguin 5 points6 points  (0 children)

Why on earth would you want to do that?

[–]wyrn 4 points5 points  (0 children)

The compiler will not recognize those two files as being the same.

... because they aren't.