Well explained, thanks!
Type: Posts; User: milli-961227
Well explained, thanks!
Hi folks,
I've just figured out something interesting by accident. For demonstration purposes, let's assume we have two classes:
class one {
public:
explicit operator bool() const...
Okay, I'll try to build the current development version of GCC the next few days and see if the problem is fixed, otherwise I'll have a look at bugzilla. Thanks for your efforts, they're very much...
Could that mean it is a compiler-specific issue? I've just tried out clang - the same code compiled and linked without complaints!
$ g++ --version
g++ (GCC) 5.2.0
Copyright (C) 2015 Free...
Sorry, I just wanted to demonstrate what I want to do. Hope this helps:
#include <cstddef>
#include <string>
struct base {
base(std::string label) {}
Hi,
I've just figured out something I find quite astonishing:
struct base {
base(std::string label);
};
Hi,
I have a program that uses DBus (Linux) to connect to the interface `org.freedesktop.NetworkManager' in order to call its method `GetDevices'. This is needed for populating a list of network...
Okay, thank you!
Hey folks,
just found out that stream operators are treated in a different way when using GCC or Clang as compilers. Until now, I always assumed that something like this was the way to go when...
Ok I think I figured it out. The problem is the initializer list of the vector, which can't move objects but only copy them. Therefore using the initializer list won't work for objects of type...
Ok, I could also have used the code below but changing the context doesn't change the problem (I guess). The program still tries to call the deleted copy constructor:
struct base {
...
Hi,
struct base {
virtual ~base()=default;
};
template<typename... Types>
Thank you very much
Thanks for your explanation, though I'm still unsure whether it's the correct approach for what I want. Maybe I should provide a bit more context:
class subject;
class layout; // mainly...
That's what I'm afraid of too... But wouldn't this lead to double occurrence of the base `mask' in `description' in this case (the Diamond Problem)? So far I haven't been able to come up with a...
Hey,
just some code and the question whether this is bad design?
class mask { // virtual interface
public:
virtual ~mask()=default;
};
Hm, I guess you have a point... I'll consider to slow down a little bit in the future, sorry :D
By the way, for the ones interested in the problem: I managed to solve it. I'll post the code below...
Hey folks,
I'm still playing around with template metaprogramming or more specifically with something that is being referred to as Concepts Lite.
The goal is to have code such as shown below in...
Well, I think I'll go this way since my `container.tcc' is already full of ugly definitions like this one:
template<typename Type,
template<typename...> typename Container, typename...
Thank you Elysia, I haven't thought it was possible, but obviously I was wrong. It's always good to learn something new; I'll keep this in mind for the future.
Hey,
I'm not really an expert but have you considered the following:
class test {
class implementation;
public:
Hey,
I'm currently working on a wrapper class for all types of containers that conform to the standard library concepts and already got some help on how to make functionality conditionally...
Ah, this makes sense I guess... And it also leads to a much cleaner solution in my case:
template<typename Type, template<typename...> typename Container>
class container {
public:
...
Thanks, that's the answer! I'll try it with something like that:
c++ - void_t "can implement concepts"? - Stack Overflow
Concept Checking in C++11 | Eric Niebler
Well, I for myself wouldn't rely on the fact that its currently working for you in this case. The problem begins when other people start making use of your code and get slained by thousands of errors...