Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
106 views

This is an attempt to make an alias to an anonymous class: struct { int i = 0; } a; // error C7626 in MSVC using A = decltype(a); This produces an error in Visual Studio: error C7626: unnamed ...
Fedor's user avatar
  • 24.7k
2 votes
1 answer
86 views

C# .Net Framework 4.8. I am using CryptoStream Reader to decrypt an encrypted datastream within a Using {} block. If the Key used for decryption is incorrect, the CryptoStream Reader throws an ...
Himilou's user avatar
  • 177
2 votes
1 answer
67 views

I have a stored procedure in which, through dynamic SQL, I want to delete rows where energy = 0. This works allright as long as I use string concatenation for the query build-up. But when I try to use ...
Leo's user avatar
  • 61
2 votes
1 answer
138 views

The following not very long program is treated differently by the current compilers: class A { protected: operator auto(); }; template<class> struct B : A { using A::operator auto; }; ...
Fedor's user avatar
  • 24.7k
0 votes
0 answers
102 views

I'm writing a GCC plugin and would like to identify typedef and using. plugin.cpp #include <gcc-plugin.h> #include <tree.h> #include <tree-pretty-print.h> #include <plugin-version....
Guillaume17's user avatar
-1 votes
2 answers
154 views

This question is specific to multi-threaded applications under .NET 9. I often deal with COM Interop scenarios where references must be disposed of in a specific order, while the order of obtaining ...
Raheel Khan's user avatar
  • 14.8k
2 votes
0 answers
113 views

In our code we have a class which has an alias (typedef), and we are trying to deprecate that alias. We do not want to deprecate the original class (really, the class with its new name). We want to ...
Nick Williams's user avatar
0 votes
0 answers
62 views

I am using Snowflake, joining two tables using zip codes. One table has a zip code , other has a value linked to zip code from - zip code to combination. Zip codes go from all numbers to numbers and ...
Rui Sá-Dias's user avatar
1 vote
2 answers
111 views

I am trying to define a function type alias that depends on a template parameter, T. Specifically the function type is of the form void foo(T) if T is not void, and void foo() if it is void. #include ...
user1470475's user avatar
0 votes
2 answers
276 views

I'm aware of the guidance to not use using in C++ header files, the reasons for which have been widely discussed, e.g. here. I was looking for a more C++ alternative to typedef when I came to this ...
StoneThrow's user avatar
  • 6,435
3 votes
1 answer
91 views

I am trying to open a file in c#, then write some text into it, and conclude by dumping a compression of a bytes array into the same file. So, the file I want to create is something like ...
5xum's user avatar
  • 5,575
-4 votes
2 answers
79 views

enum class Color { RED, BLACK }; enum class TreeModel { AVL, RED_BACK, SPLAY } struct BasicNode { BasicNode* left; BasicNode* right; BasicNode* parent; }; struct SplayNode : BasicNode { ...
vansergh's user avatar
  • 101
1 vote
2 answers
151 views

I have this piece of code #include <iostream> namespace ns{ int a = 10; } using namespace ns; int a = 20; int main(){ std::cout << a; } As per my understanding, when std::cout &...
Rajdeep Sindhu's user avatar
0 votes
1 answer
45 views

I am trying figure out if it is possible to use package name not explicitly as eg DataFrames etc or as a String variable with a name of this module with using. My test code is: dependencies=["CSV&...
kwicher's user avatar
  • 2,082
0 votes
1 answer
52 views

I need to refer the variables in slide object modules to refresh the charts which I am struggling since a week. Could anyone help me please? I just need make Slide2146449163 as variable since SRngMkt, ...
Kalyan's user avatar
  • 5
2 votes
0 answers
38 views

I am having problems with gcc-11 C++ compiler when using multiple inheritance and I want to call a specific method of the base class and I write using A::m1 explicitely. Visual C++ 2022 works with ...
Pedro C.'s user avatar
2 votes
2 answers
152 views

I am using a decltype to ensure a template function force2 has the same parameter and return types as another template function force1 but it doesn't compile. I require the functions to be templated. ...
Sin3point14's user avatar
1 vote
2 answers
86 views

In the following code do I need both of the these methods in order to achieve a rollback in case of a failure; Or the Using-End Using covers that case already? Public Function ProcessMultipleMessages()...
Prometheus's user avatar
  • 1,291
0 votes
0 answers
153 views

I'm new to C# and JetBrains Rider and I'm having trouble using a namespace of a project in another project. I have one project with a namespace called math which I want to test through unit tests in a ...
koalaCooper's user avatar
0 votes
1 answer
94 views

I want to resolve an inheritance problem of my Paladin class. Here is a resume of the inheritance between my classes : class Peasant { virtual int attack(); } class Knight : virtual public ...
Apropalix's user avatar
0 votes
1 answer
46 views

I have this code public static void AddMeter(List<string> meter) { using MeterProvider meterProvider = Sdk.CreateMeterProviderBuilder() .AddMeter("Meter.Errors") ...
AAA's user avatar
  • 169
1 vote
0 answers
46 views

The C# doc on the using directive says The using directive allows you to use types defined in a namespace without specifying the fully qualified namespace of that type. I understood this to mean ...
joseville's user avatar
  • 1,013
0 votes
1 answer
85 views

I am trying to initialize my template class with a type alias as template parameter, but only the specialized version of my class is created. I understand the problem is in the ambiguity of my aliases....
Miroslav Krajcir's user avatar
0 votes
0 answers
63 views

There's a new context manager on the block. with died quietly, so naturally it's time to re-brand and revive :) Setup: Looking at the new using keyword I immediately found a scenario where it would be ...
liminor's user avatar
  • 196
0 votes
1 answer
877 views

I want to shorten a namespace for use within MyClass, for example by using namespace or defining an alias: namespace foo = really::loong::name::space; class MyClass { private: foo::FooClass f; // ...
H.v.M.'s user avatar
  • 1,746

1
2 3 4 5
37