Category "c++"

0xc000007b Error?

here is some information to understand my situation better. OS: windows 8.1 IDE: Visual Studio 2008 Pro Language: C++ i have just my Firefox reinstalled and

Boost MSM call .process_event on outerSM's orthogonal region from submachine

I implemented the depicted state machine as a minimum example in boost::msm. The Code may be reviewed here: https://wandbox.org/permlink/tIhZao8YGhJvPMfF As sh

const& , & and && specifiers for member functions in C++

Recently I was reading through the API of boost::optional and came across the lines: T const& operator *() const& ; T& operator *() & ; T

How to specify -std=c++11 option in bazel BUILD file?

How to add this option into a target description section? Thanks.

How do you add Gtk::Notebook tabs at runtime from Glade definitions?

I am creating a new GTK app (using gtkmm) and the main interface is tabbed, a bit like a web browser. I want to create a new tab for each document the user ope

Why isn't abs constexpr?

In <cinttypes>, since C++11, there are the following two overloads: std::intmax_t abs( std::intmax_t n ); std::intmax_t imaxabs( std::intmax_t n ); Why

shared_from_this causing bad_weak_ptr

I am trying to keep a list of connected clients in asio. I have adapted the chat server example from the docs (http://www.boost.org/doc/libs/1_57_0/doc/html/boo

When does instantiation happens for explicit instantiation of a function template

Hi i am learning about explicit instantiation. And so reading different examples but in one example have some doubts. The example is given below and i have 2 do

The implementation of std::forward

I'm reading Overview of the New C++ (C++11/14) (PDF only), at Slide 288 it gives an implementation of std::forward: template<typename T> //

The procedure entry point _ZNSt7_cxx1112basic_stringlcSt11char_traitslcESalcEEC1Ev could not be located in the dynamic link library

I am having immense difficulty trying to use std::string. The program compiles absolutely fine, but when I run the program, I receive this error: error I have

CMake - how to build Boost after downloading it with FetchContent?

My goal is to download the Boost repository if it isn't found and then build it the default way, i.e. using boostrap and b2 tools. I know, I can download it l

Cpp: JSON parser in Cpp that provide support Serialize/Deserialize feature, converting JSON objects to user-defined classes?

I'm working on native C++ development and looking for JSON parser that can handle complex JSON files and convert into class objects. I've looked at native ben

Is it possible to use std::string in a constexpr?

Using C++11, Ubuntu 14.04, GCC default toolchain. This code fails: constexpr std::string constString = "constString"; error: the type ‘const string

How to compile/use header unit modules under CLang C++?

It is said in docs that modules support in CLang is partial. I'm using CLang under Windows 64-bit from recent release of LLVM 12.0. I successfully managed to us

why doesn't C++ allow rebinding a reference?

Is it a problem to rebind a reference? I've searched this question on Google, but I can't find relevant answers to this question. What made the designers of C++

why doesn't C++ allow rebinding a reference?

Is it a problem to rebind a reference? I've searched this question on Google, but I can't find relevant answers to this question. What made the designers of C++

How to add _ITERATOR_DEBUG_LEVEL to CMake?

I am new to CMake, and I want to set _ITERATOR_DEBUG_LEVEL to 0 for Release build, and 2 for Debug build, to fix issues when trying to compile a project that de

Friend function inside class and outside class, what difference does it make?

#include<iostream.h> #include<conio.h> class time { private: int dd,mm,yy; public: friend istream & operator >>(is

Value greater than 10^5 in 2d array was not declared in scope

When I tried:int global[10000][10000]; it works but whenint global[100000][100000]; when I try to access it it gives me error: global was not declared in the s

What is the difference between std::reference_wrapper and a simple pointer?

Why is there a need to have std::reference_wrapper? Where should it be used? How is it different from a simple pointer? How its performance compares to a simple