Noutați

CloudBees CEO: State of Software Development is a Disaster

CloudBees CEO Anuj Kapur told attendees at a DevOps World event today that with developers spending only 30% of their time writing code the current state of software development in enterprise IT organizations is a disaster. After more than 14 years of effort, the promise of DevOps—in terms of being able to accelerate the rate at which applications are being deployed—remains largely academic, said Kapur. In fact, the effort to shift more responsibility for application security further left toward developers has only increased the amount of cognitive load and reduced the amount of time available to write code, he noted. However, with the rise of generative artificial intelligence (AI), an inflection point that will dramatically increase the velocity at which applications are being built and deployed has arrived, said Kapur. The challenge will be achieving that goal without increasing the cognitive load on developers. That cognitive overload results in 70% of developers’ time not being productive within organizations that often hire thousands of developers, he noted. Despite all the DevOps issues that need to be addressed, AI advances promise improvement. The overall DevOps market is still relatively young, given the current level of adoption, said Kapur. “We continue to believe the market is early,” he said. Today, CloudBees took the wraps off the first major update to the open source Jenkins continuous integration/continuous delivery (CI/CD) platform to have been made in the past several years. At the same time, the company also unveiled a DevSecOps platform based on Kubernetes that is optimized for building and deploying cloud-native applications based on portable Tekton pipelines. That latter platform provides the foundation through which CloudBees will, in the months ahead, apply generative AI to software engineering to, for example, create unit tests on the fly and automate rollbacks. In addition, DevSecOps capabilities will be extended all the way out to the integrated development environments (IDE) to reduce the cognitive load of developers. The overall goal is to reduce the number of manual processes that create bottlenecks that make it challenging to manage DevOps at scale. Criticism of the level of developer productivity enabled by DevOps compared to other development approaches needs to be tempered, said Tapabrata Pal, vice president of architecture for Fidelity Investments, because it still represents a significant advance. There is still clearly too much toil, but the issues that impede the pace at which developers can effectively write code tend to be more cultural than technical, he added. Organizations are not inclined to automatically trust the code created by developers, so consequently, there is still a lot of friction in the DevOps process, noted Pal. In theory, advances in AI should reduce that friction, but it’s still early days in terms of the large language models (LLMs) that drive generative AI platforms and their ability to create reliable code, he added. That should improve as LLMs are specifically trained using high-quality code, but in the meantime, the pace at which substandard code might be generated could overwhelm DevOps processes until AI is applied there as well, said Pal. Thomas Haver, master software engineer for M&T Bank, added that while assisted AI technologies will have a major impact, it’s not reasonable to expect large organizations to absorb them overnight. Patience will be required to ensure advances are made in ways that […]

Read More

JFrog swampUP: Addressing the Advent of AI

At JFrog SwampUp 2023, the buzz with all about AI, especially with JFrog’s announcement of Machine Learning (ML) Model Management capabilities. These conversations around AI and ML reflected these technologies’ growing influence and importance in the DevOps world. How much of the generative AI conversation is just hype, though? And what does that mean for AI and ML as a whole? Alan Shimel, CEO of Techstrong Group, and I sat down with Stephen Chin, VP of DevRel at JFrog, to find out. As far as Chin is concerned, even as more companies create and leverage AI models, these models must be managed like any other software component. Chin said JFrog Artifactory acts as a staging ground to operationalize models using DevSecOps best practices. Algorithms and models will continue to grow in size and complexity, and they will require robust processes around deployment and management – just like any other software artifact. The key, Chin said, is to think of ML as just another development language and leverage tools that standardize and streamline working with it. Compared to traditional enterprise applications, though, DevOps workflows for AI/ML are still relatively immature, but Chin said JFrog’s new model management capabilities aim to provide that missing automation and governance using DevSecOps best practices for governance, security, and licensing compliance. Additionally, Chin noted that AI/ML have become essential for development teams to keep up with the explosive demand for code. At this point, AI has become table stakes. In the AI arms race, the winners are those who understand AI has become a vital development tool to enhance productivity. In terms of job security, the losers are the ones who can’t keep up with the volume of code. According to Chin, you are out of the running if you don’t embrace AI. Looking ahead, AI will not make developers obsolete, though – quite the opposite. Given the quasi-unlimited appetite for new code, Chin emphasized that developers who embrace AI will have more work than ever. One way to think of it is that AI provides a new form of “outsourcing” to boost human productivity, much like previous waves of innovation in computer science. When it comes to security, there are still challenges that need to be addressed; code generated by today’s AI solutions still has significant drawbacks like potential data bias, lack of explainability and simple errors. In the long term, though, Chin believes AI itself will provide the solution to secure an exponentially growing codebase, given its superior scale. Just as AI will make individual developers more productive, it can also supercharge security teams – but it can also empower bad actors. The key will be continuing to democratize the benefits to even the playing field. AI promises to be a transformative technology on the scale of the Bronze Age or Quantum computing, Chin said, but the path forward will require humans and machines working together to ensure it’s used for good. It’s clear that the pace of innovation in AI and ML is rapidly accelerating. As these technologies become further democratized and integrated into developer workflows, they promise to transform how software is built and secured, Chin said. Companies must take advantage of this technology innovation by providing the pipelines and governance for this software revolution, he added. Chin believes the future will […]

Read More

Learn To Use Generalized Lambda Captures In C++

Impact-Site-Verification: 9054929b-bb39-4974-9313-38176602ccee The Lambda Expression construct is introduced in C++ 11 and further developed in the C++14, C++17, and C++20 standards. C++14 standard introduced the generalized lambda capture (init capture) that allows you to specify generalized captures, it allows to use move capture in lambdas. In C++14, lambda expressions are improved by the generalized lambda (generic lambda) and by this generalized lambda captures. In this post, we explain how to use generalized lambda captures in modern C++ What is a lambda in C++? A Lambda Expression defines an anonymous function or a closure at the point where it is used. You can think of a lambda expression as an unnamed function (that’s why it’s called “anonymous”). Lambda expressions help make code cleaner, and more concise and allow you to see behavior inline where it’s defined instead of referring to an external method, like a function. Lambda Expressions are an expression that returns a function object, and they are assignable to a variable whose data type is usually auto and defines a function object. The syntax for a lambda expression consists of specific punctuation with = [ ] ( ) { … } series. If you are new to lambdas or want to know more about them, please check these two posts that we released before. How to use a generalized lambda function in C++ Before C++14, lambda function parameters need to be declared with concrete types, as in the given example above. C++14 has a new generic lambda feature that allows lambda function parameters to be declared with the auto-type specifier. The basic syntax of a Lambda Expression in C++ is; Datatype Lambda Expression = [Capture Clause] (Parameter List) -> Return Type { Body } Generalized lambdas can be defined with the auto keyword that comes with C++11. We can define a generic lambda with the auto keyword as below. auto add_things = []( auto a, auto b ) {    return a + b; }; We can use this lambda with an int type, int x = add_things( 10, 20 ); or we can use it with a float type, float f = add_things( 10.f, 20.f ); or we can use it with bool, char, double, long long double,… etc types. This is why it is called as ‘generalized‘, it is a general form that we can use with any types. Very useful and powerful. What are generalized lambda captures in C++? The Lambda Expression construct is introduced in C++ 11 and further developed in the C++14, C++17, and C++20 standards. C++14 standard introduced the generalized lambda capture (also known as init capture) that allows you to specify generalized captures. In C++14, lambda expressions are improved by the generalized lambda (generic lambda) and by this generalized lambda captures, it allows to use move capture in lambdas. A generalized capture is a new and more general capture mechanism, it allows us to specify the name of a data member in the closure class generated from the lambda, and an expression initializing that data member. Lambdas can capture expressions, rather than just variables as in functions, and this feature allows lambdas to store move-only types. How to use generalized lambda captures in C++ Let’s see how we can use generalized lambda captures in modern C++, std::move can be used to move objects in lambda captures as below, struct […]

Read More

What Is Auto Return Type Deduction In C++?

C++11 allowed lambda functions to deduce the return type based on the type of the expression given to the return statement. The C++14 standard provides return type deduction in all functions, templates, and lambdas. C++14 allows return type deduction for functions that are not of the form return expressions. In this post, we explain the auto keyword, what is an auto type deduction, and how we can use it in functions, templates, and lambdas. Here are some very simple examples. What is the auto keyword in C++? The auto keyword arrives with the new features of the C++11 standard and above. It can be used as a placeholder type specifier (an auto-typed variable), or it can be used in a function declaration, or a structured binding declaration. The auto keyword can be used with other new CLANG standards like C++14, C++17, etc. Here is a simple example of how to use auto-typed variables in C++.   unsigned long int L;   auto a = L; // a is automatically unsigned long int   The auto keyword was being used as an automatic data specifier (storage class specifier) until C++11. This feature was removed by the C++11 standard. What is auto return type deduction in C++? In object oriented programming, type inference or deduction means the automatic detection of the data type of an expression and its conversion to a new type in a programming language and auto return type deduction may deduce return. type (i.e. float parameters to int return values). By the C++14 standard, we can use auto return type deduction in functions, templates, in lambdas. Now let’s see some simple examples that show how we can use them. If you want to use return type deduction in functions, templates, and lambdas, it must be declared with auto as the return type, but without the trailing return type specifier in C++11. The auto return type deduction feature can be used with parameter types in functions. Here is a simple example,   auto sq(int r)   // auto return type deduction in function { return r*r; }   The auto return type deduction feature can be used on modified parameters. Here is a simple example.   auto inc(int r)  // auto return type deduction in function { return ++r; }   The auto return type deduction feature can be used with references in functions.   auto& zero(int& r) // auto return type deduction in function { r = 0; return r; }   The auto return type deduction can be used with templates. Here is an example:   template auto template_sq(T t) // auto return type deduction in template { return (int)(t*t); // deduce to int }   The auto keyword is very useful in lambda declarations and it has an auto return type deduction feature too. See a simple lambda example below.   auto lambda_sq = [](int r)  // auto return type deduction in lambda { return r*r; };   Note that one of the important differences between lambdas and normal functions is that normal functions can refer to themselves by name but lambdas cannot. Is there a full example of auto return type deduction in C++? Here is a full example about auto return type deduction in functions, a template and a lambda. 1 2 3 4 5 6 7 8 9 10 11 […]

Read More

Enhancing the CMake Targets View in Visual Studio

Enhancing the CMake Targets View in Visual Studio Sinem Akinci September 20th, 20231 2 The CMake Targets View in Visual Studio is a view that allows you to visualize your CMake project structure by the CMake targets and build specified target libraries and executables. To make this view more usable, we have implemented a few new improvements to make it easier than ever to navigate your CMake targets. This includes improved navigation to the CMake Targets View, a new, more simplified CMake Targets View, and the ability to exclude specified CMake items from the Targets View. Additionally, we have future planned work in the near-term to allow users to customize this view to their desired configuration. Download the latest preview version of Visual Studio to try out the new updates for the CMake Targets View. Get to your CMake Targets View Quicker Than Ever Customers have reported that it can be cumbersome to switch between CMake Targets View and the Solution Explorer. To address this, we have implemented new entry points to open the CMake Targets View much more quickly. Switch to your CMake Targets View from Solution Explorer Now, you can right-click anywhere in your Solution Explorer and simply navigate to the CMake Targets View from the context menu. Open the CMake Targets View from the ‘View’ Dropdown Menu You can also access the CMake Targets View globally at any point in your CMake projects by selecting from the View dropdown. Simplify your Source Navigation The CMake Targets View has been further simplified so that users don’t have to click through folders without buildable executables to get to their desired target.   Define Items to Exclude from View You can now define in your VSWorkspaceSettings.json items to exclude from the CMake Targets View using the new CMakeTargetsViewExcludedItems field. The CMakeTargetsViewExcludedItems field is an array of strings. The field supports the following syntax and identifiers: Supported “identifiers”: CMakeProject, CMakeTarget, CMakeReference, CMakeFolder, CMakeFile. Syntax for the CMakeTargetsViewExcludedItems is the following: : This will specify any identifier with the specified name. For example, CMakeTarget:app. Any CMake targets with the name “app” anywhere in the CMake Targets View will be excluded. Additionally, if you want to specify specific items to be excluded, you can use a – to chain declarations together::-:… For example, CMakeProject:thirdPartyDependency-CMakeTarget:irrelevantThirdParty. Example usage in a VSWorkspaceSettings.json: {   “CMakeTargetsViewExcludedItems”: [     “CMakeTarget:-CMakeFile:*”, “CMakeTarget-*-CMakeFile:*”, “CMakeTarget:-*-*-CMakeFile:*” } What’s Coming Next? We are continuing to develop the CMake Targets View to allow for further customization of this view based on customer feedback. Stay tuned for the latest updates as these ship in the future! We are planning to give users the ability to filter their CMake Targets view by type of target, project, etc. Users will be able to dynamically pin and unpin their most used targets to the top of the CMake Targets View. We are using this suggestion ticket to track any other requests you may have for improvements to the CMake Targets View to meet your CMake needs: CMake Targets View Suggestions – Developer Community (visualstudio.com) Anything else? You can also find us on Twitter (@VisualC) or via email at visualcpp@microsoft.com. To open a bug, please see Visual Studio Feedback. Sinem Akinci Program Manager II, Visual C++ Team Follow

Read More

Learn How To Use Integer Literals And The Deprecated Attribute In C++

Hello fellow C++ Developers. Since January we have released many new posts covering the features of the C++11 standard. These features are mostly done, and this week we start on describing C++14 features. We have five more beginners to professional-level topics in modern C++. C++ evolves and refines itself even further with the release of each new C++ standard. C++14 came with a new deprecated attribute feature to allow marking an entity as deprecated – potentially obsolete and best avoided. We explain what deprecated means and how to use the deprecated attribute in C++. In another post, we explain why the gets function was deprecated in C++11 and eventually removed altogether in C++14. We teach integer literals, and binary literals that come with C++14. There is also a great new feature, digit separators that makes it easy to see integer values in coding, and we explain how to use it in different integer types. Our educational LearnCPlusPlus.org site has a whole bunch of new and unique posts with examples suitable for everyone from beginners to professionals alike. It is growing well thanks to you, and we have many new readers, thanks to your support! The site features a plethora of posts that are great for learning the features of modern C++ compilers with very simple explanations and examples. RAD Studio’s C++ Builder, Delphi, and their free community editions C++ Builder CE, and Delphi CE are a real force for modern application development. Table of Contents Where I can I learn C++ and test these examples with a free C++ compiler? How to use modern C++ with C++ Builder? How to learn modern C++ for free using C++ Builder? Do you want to know some news about C++ Builder 12? Where I can I learn C++ and test these examples with a free C++ compiler? If you don’t know anything about C++ or the C++ Builder IDE, don’t worry, we have a lot of great, easy to understand examples on the LearnCPlusPlus.org website and they’re all completely free. Just visit this site and copy and paste any examples there into a new Console, VCL, or FMX project, depending on the type of post. We keep adding more C and C++ posts with sample code. In today’s round-up of recent posts on LearnCPlusPlus.org, we have new articles with very simple examples that can be used with: The free version of C++ Builder 11 CE Community Edition or a professional version of C++ Builder  or free BCC32C C++ Compiler and BCC32X C++ Compiler or the free Dev-C++ Read the FAQ notes on the CE license and then simply fill out the form to download C++ Builder 11 CE. How to use modern C++ with C++ Builder? C++ is very strong in every aspect of modern programming and evolves and refines itself even further with the release of each new C++ standard. While there are many new additions there are some features that are found not useful or ‘dangerous’ in programming, thus the C++ community offers its deprecation in the next released C++ standard and then it is generally removed in the following standard. C++14 came with a new deprecated attribute feature to allow marking an entity as deprecated – potentially obsolete and best avoided. In the first post, we will explain what deprecated means and how can we use the [[deprecated]] and __declspec(deprecated) attributes in modern C++. Modern C++ has a lot of useful functions […]

Read More

Cum să înbunătățești în 2023 productivitatea echipei de dezvoltare cu GitLab Duo

Află cum GitLab Duo te poate ajuta să dezvolți software mai sigur, mai rapid și mai eficient, beneficiind de scanarea automată a vulnerabilităților de cod, aplicarea politicilor de securitate și auditare, generarea și optimizarea automată a codului, sugerarea și aplicarea celor mai bune practici și standarde de codare, oferirea de feedback și recomandări personalizate, asigurarea unei autentificări sigure și ușoare a dezvoltatorilor, și multe altele. De asemenea, află cum poți să testezi gratuit pentru 30 de zile fără a fi necesar datele cardului bancar soluția GitLab Ultimate care include GitLab Duo. Introducere: Provocările actuale cu care se confruntă echipele de dezvoltare software Dezvoltarea software este un domeniu în continuă evoluție, care implică o serie de provocări pentru echipele care lucrează la proiecte complexe și inovatoare. Una dintre aceste provocări este de a asigura securitatea codului, care este esențială pentru a preveni atacurile cibernetice, a respecta reglementările și a proteja datele sensibile. O altă provocare este de a optimiza viteza și calitatea livrării codului, care sunt cruciale pentru a satisface cerințele clienților, a menține competitivitatea și a reduce costurile. Pentru a face față acestor provocări, echipele de dezvoltare au nevoie de instrumente și soluții care să le ajute să gestioneze eficient ciclul de viață al software-ului, de la planificare, la codare, la testare, la implementare și la monitorizare. În acest articol, vom prezenta cum GitLab, o platformă integrată pentru gestionarea ciclului de viață al software-ului, oferă funcționalități asistate de inteligență artificială (AI) care pot îmbunătăți securitatea și productivitatea echipei tale de dezvoltare. Vom arăta cum GitLab folosește AI pentru a detecta și remedia vulnerabilitățile de cod, pentru a genera și optimiza automat codul, pentru a sugera și aplica cele mai bune practici și standarde de codare, și pentru a oferi feedback și recomandări personalizate. De asemenea, vom discuta despre beneficiile și avantajele pe care le aduce GitLab prin integrarea AI în platforma sa, precum și despre planurile și viziunea sa pentru viitor. GitLab: soluția integrată pentru automatizarea livrării software. GitLab este soluția integrată pentru automatizarea livrării software, care îți permite să te concentrezi pe crearea de valoare, nu pe menținerea unui lanț de instrumente fragil și complex. Cu GitLab, poți să livrezi software mai rapid, mai sigur și mai eficient. Codezi mai ușor și mai corect, folosind funcționalitățile de repository-uri Git, editor Web IDE, sugestii de cod și recenzii de cod. Astfel, poți să scrii cod în orice limbaj de programare, să editezi cod direct în browser, să primești recomandări relevante în timp ce tastezi, și să discuți și să îmbunătățești codul înainte de a fi integrat în branch-ul principal. Testezi codul tău într-un mod automat și continuu, folosind funcționalitățile de integrare continuă (CI), Auto DevOps, pipeline-uri, job-uri și artefacte. Astfel, poți să rulezi teste automate pentru a verifica calitatea și funcționalitatea codului tău, să beneficiezi de o configurare automată a CI/CD pentru proiectele tale, să vizualizezi și să controlezi fluxul de lucru al codului tău, și să stochezi și să accesezi fișierele generate de teste. Implementezi codul tău într-un mod rapid și sigur, folosind funcționalitățile de livrare continuă (CD), medii, pagini și serverless. Astfel, poți să livrezi codul tău în producție fără întârzieri sau intervenții manuale, să creezi și să gestionezi medii de dezvoltare izolate pentru fiecare branch sau cerere de unire, să publici site-uri web statice direct din GitLab, și […]

Read More

What’s New for the Remote File Explorer in Visual Studio

What’s New for the Remote File Explorer in Visual Studio Sinem Akinci September 18th, 20233 2 The Remote File Explorer gives you the capability to access your files and folders on your remote machines that you are connected to through the Connection Manager in Visual Studio, without having to leave the IDE. Since we last spoke, the team has implemented new features to further enhance your remote file workflows by listening to your direct feedback.  Download the latest preview version of Visual Studio to access the new updates for the Remote File Explorer and give it a try. Background To access the Remote File Explorer, navigate to View > Remote File Explorer after downloading through the Linux and Embedded Workflow in Visual Studio. It will also now automatically open when you open a cross-platform C++ project (vcxproj for Linux or CMake project with at least one configuration in CMake Presets with a remote SSH target). Our initial announcement can be viewed here, which goes into browsing, uploading, and downloading files. To learn more about how to connect to a remote machine through the Connection manager, please see these instructions. Now, you can view and edit these files from Visual Studio, as well as search for files through the top bar. Additionally, with the new enhanced toolbar, you are more empowered than ever to quickly perform actions on your files. Search your Files You can now search through your files and folders on your remote machine using the top bar in the Remote File Explorer. After searching, you can then right-click on any result and select “Go to remote path” to then navigate to that result’s remote path location in the Remote File Explorer. View and Edit your Files The Remote File Explorer now allows you to view and edit files on your remote machine from Visual Studio, just like you would any other file in the Solution Explorer. The Remote File Explorer will also automatically detect if your remote files have any changes that occurred so that you can be certain when in remote workflows. Home and Settings Icons New icons have been added to the toolbar of the Remote File Explorer to make it easier than ever to navigate and perform actions. Clicking the home icon quickly navigates the user back to the root node. Clicking on the settings icon opens the Remote File Explorer settings that allows you to configure your Remote File Explorer. What’s Next? To improve your end-to-end remote workflows, we are planning to further integrate this feature with the Integrated Terminal and other potential remote workflows. We would love to hear from you how you would use this feature to further shape our backlog and other planned enhancements. Please reach out to us via email if you would like to chat or we have an open feedback ticket here. Send us more feedback! We hope the latest updates to the Remote File Explorer will further empower you in your remote workflows. Please let us know your thoughts and any other ideas you may have for the feature. The comments below are open and we also have a Visual Studio Feedback ticket open to track any requests that you can comment on. You can also find us on Twitter (@VisualC) or via email at visualcpp@microsoft.com. To open a bug, […]

Read More

Learn How To Use Generic Lambdas In Modern C++

Lambda Expressions allow users to write an inline expression that can be used for short snippets of code in your C++ app which are not going to be reused and don’t require naming. The Lambda Expression construct is introduced in C++ 11 and further developed in the C++14, C++17, and C++20 standards. In C++14, lambda expressions are improved by the generalized lambda (generic lambda) or initialized lambda feature, and in this post, we remember what lambda is and explain what a generic lambda is, and how we can use it. What is a lambda expression in modern C++? A Lambda Expression defines an anonymous function or a closure at the point where it is used. You can think of a lambda expression as an unnamed function (that’s why it’s called “anonymous”). Lambda expressions help make code cleaner, and more concise and allow you to see behavior inline where it’s defined instead of referring to an external method, like a function. Lambda Expressions are an expression that returns a function object, and they are assignable to a variable whose data type is usually auto and defines a function object. The syntax for a lambda expression consists of specific punctuation with = [ ] ( ) { … } series.  If you are new to lambdas or want to know more about it, please check these two posts that we released before. How to use a lambda expression in modern C++ Simple Syntax of Lambda Expression is;   Datatype Lambda Expression = [Capture Clause] (Parameter List) -> Return Type { Body }   Now let’s see this syntax in an example. We will define a lambda expression to combine datatypes;   int add_integers = []( int a, int b ) {    return a + b; };   and we can use lambda as below,   int x = add_integers( 10, 20 );   What is the generic lambda expression in modern C++? Before C++14, lambda function parameters need to be declared with concrete types, as in the given example above. C++14 has a new generic lambda feature that allows lambda function parameters to be declared with the auto-type specifier. Generalized lambdas can be defined with the auto keyword that comes with C++11 before. Let’s take the same integer example above, we can define a generic lambda with the auto keyword as below,   auto add_things = []( auto a, auto b ) {    return a + b; };   Generic lambdas are essentially templated functor lambdas. In example, the code above is equivalent to this code,   struct {    template      auto operator()( T x, U y ) const { return x + y; } } add_things{};   How to use generic lambdas in modern C++ We can use this lambda with int type,   int x = add_things( 10, 20 );   or we can use with float type,   float x = add_things( 10.f, 20.f );   or we can use it with bool, char, double, long long double,…etc types. This is why it is called as ‘generalized‘, it is a general form that we can use with any types. Very useful and powerful. Note that, auto type deduction is added into C++14, and generic lambdas feature follow the rules of template argument deduction. Is there an example of how to use generic lambdas […]

Read More

Learn How To Use Binary Literals In Modern C++

C++14 brings us fewer but useful features to modern C++ than the standards preceding it. The creator of C++, Bjarne Stroustrup says that improvements in C++14 were deliberately lower in quantity compared to C++11. One of the small but useful features is the introduction of “Binary Literals”. C++14 comes with the Binary Literals feature, and in this post, we explain how we can use binary bits.  Learn how to use binary literals in modern C++ A binary literal is an integer literal that your binary number begins with 0b or 0B and consists of a sequence of binary digits (base two). It is defined in  and provides a convenient way to represent a binary base-2 number (1 and 0), useful for the developers in IDE, and useful to compilers that understand it is a binary value. Here is a simple example of how we can use it.   #include   int main(){ int b1 = 0b00111011; }   Is there a simple example about how to use binary literals in modern C++? We can use it with digital separators, which are another feature of C++. Here is an example, this time we used constants.   const int b8 = 0b1111‘0000; const int b16 = 0b1111′0000‘1111’0000; const int b32 = 0b1111‘0000’1111‘0000’1111‘0000’1111‘0000;   Note that, we can NOT use digital separator after the 0b literal as below.   const int b8 = 0b‘1111’0000;   Is there a full example about how to use binary literals in modern C++? Here is a full example about how to use binary literals in C++. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21   #include #include   int main() { int b = 0b00111011;   int b8 = 0b1111‘0000; int b16 = 0b1111′0000‘1111’0000; int b32 = 0b1111‘0000’1111‘0000’1111‘0000’1111‘0000;   std::cout

Read More