News for hackers. Stuff that matters.
Re:Deprecating Raw Pointers in C++20 by mehrdadn on Sunday April 01, 2018 @06:37AM (#16727642)
If it were for real how would you implement smart pointers?
Re:Deprecating Raw Pointers in C++20 by mbel on Sunday April 01, 2018 @06:40AM (#16727652)
In C obviously or you know, in inline assembly since it seems that it isn't going anywhere. But joking aside they could be implemented by the compilers similar to how std::function is implemented today.
Re:Deprecating Raw Pointers in C++20 by fooker on Sunday April 01, 2018 @06:42AM (#16727654)
There is no magic in std::function Implementation. std::initializer_list, on the other hand needs some magic from the compiler.
Re:Deprecating Raw Pointers in C++20 by mehrdadn on Sunday April 01, 2018 @06:45AM (#16727659)
Inline assembly isn't standard C or C++ though?
Re:Deprecating Raw Pointers in C++20 by foldr on Sunday April 01, 2018 @07:13AM (#16727722)
There have always been library features in the C and C++ standards that can't be implemented using standard C or C++. setjmp and longjmp would be the obvious examples.
Re:Deprecating Raw Pointers in C++20 by pjmlp on Sunday April 01, 2018 @06:57AM (#16727682)
It is pseudo standard in C++.

Meaning ANSI C does not refer at all to inline Assembly, from its point of view it does not exist.

ANSI C++ on other hand, specifies the asm keyword and that it should enable a compiler specific way to write inline Assembly.

But yeah, neither of them actually specifies how it should look.

Re:Deprecating Raw Pointers in C++20 by mbel on Sunday April 01, 2018 @06:57AM (#16727680)
But still can be (and is) used to implement some features from the standard library.
Re:Deprecating Raw Pointers in C++20 by FrankHB on Monday April 02, 2018 @01:52AM (#16732609)
It isn't.

Quoted from the C++ standard: "the asm declaration is conditionally-supported; its meaning is implementation-defined". ISO C does not differ much in conformance (the asm keyword is common extension listed in annex J). There exists implementation without inline assembly support, e.g. MSVC x64. There are alternative keywords used in practice (e.g. `__asm` or `__asm__ __volatile__`). Actually the contents are not supposed to be assembly language in all cases when it is supported, as I know there exists implementation with JavaScript as the "assembly" (Cheerp). Even the implementation supports "genuine" assembly, it varies in syntax, e.g. for x86, Intel (MSVC), AT&T (Clang), or both (GCC) ?

So no, you can't expect it too much, if you have to.