templates – How do I create definable type aliases that will not be reset when the scope is closed in C ++?

I'm trying to implement the class with some functionality of std :: any. In addition, I've decided to remove std :: any_cast analogue so that I can easily access the value stored in an instance of a class without specifying the type explicitly while the access is running.

I tried to use typedef Keyword, however, because the redefinition of type aliases is allowed or allowed as a constructor Operator = Range closes, the type is reset to void *,

Do you have ideas how to implement such a thing?

What I have so far is something like this:

Class arbitrary
    any (const T && other): _ptr (new T (std :: forward)(others))), t (1)
typedef T _type;
bool b = * (_typ *) _ ptr == other;
_type tmp = * (_typ *) _ ptr;
    invalid operator = (const T && other)
typedef T _type;
if (_ptr) delete _ptr;
_ptr = new T (std :: forward(other));
bool operator == (const any && rval) const
To attempt {
return * (_typ *) _ ptr == * (_typ *) rval._ptr? true wrong;
Catch (...)
return it incorrectly;
bool operator == (const any & lval) const
To attempt {
return * (_typ *) _ ptr == * (_typ *) lval._ptr? true wrong;
Catch (...)
return it incorrectly;
friend std :: ostream & operator << (std :: ostream & os, any & val);
car val ()
car a = * (_typ *) _ ptr;
Return a;
Operator Bool ()
return _ptr? true wrong;
~ any ()
delete _ptr;
typedef void * _type;
void * _ptr;
std :: ostream & operator << (std :: ostream & os, any & val)
os << val.val ();
Return os;

Well, I can just define an any_cast function for the class. However, this is not what I am looking for for my research purposes.

Every advice is appreciated.

$ 3 / year LifeTime – Host Koala – TEN Locations, 99.9% Uptime, cPanel, Pure SSD, Daily Backups

host Koala is a webhosting company based in Malaysia that has offered reliable and affordable shared hosting since 2010.


We offer 40% off all our plans. Just use the coupon code wht40 during the ordering process. This voucher gives you a 40% discount for life!

Properties :

  • Cpanel control panel
  • LiteSpeed ​​Web Server
  • Several PHP versions (PHP 5.x to 7.x)
  • Softaculous 1-Click Script Installer (Install WordPress, OpenCart, Prestashop, Drupal, Joomla, PHPBB, Dolphin in 1 Click)
  • Daily backups (Jet Backup) accessible from cPanel
  • CloudLinux Operating System (CentOS)
  • Live chat (9 – 10 pm +8 GMT time)
  • 99.9% Server Uptime (Link: Uptime Page)
  • 45-day money-back guarantee
  • Unlimited MySQL databases, subdomains
  • Free unlimited automatic SSL certificates / encryption of SSL certificates
  • TEN locations: Las Vegas, Atlanta, Canada, London (UK), Netherlands, France, Germany, Luxembourg (offshore), Singapore (ASIA), Syndey (Australia)

standard plan (Regular price: $ 5 / year – now only $ 3 / year with voucher WHT40)
Hard disk space: 1 GB Pure SSD
Bandwidth: 100 GB monthly bandwidth
Host a domain
Order now : https://www.hostkoala.com/pricing.html

Middle plan (Normal price: 10 USD / year – now only $ 6 / year with voucher WHT40)
Hard disk space: 3 GB Pure SSD
Bandwidth: 300 GB monthly bandwidth
Host three domains
Order now : https://www.hostkoala.com/pricing.html

Incentive plan (Regular price: $ 5 / year – now only $ 12 / year with voucher WHT40)
Hard disk space: 5 GB Pure SSD
Bandwidth: 500 GB monthly bandwidth
Host unlimited domains
Order now : https://www.hostkoala.com/pricing.html

Business Plan (Normal price: 5 € / month – now only $ 3 / month with voucher WHT40)
Hard disk space: 10 GB Pure SSD
Bandwidth: 1000 GB monthly bandwidth
Host unlimited domains
Order now : https://www.hostkoala.com/pricing.html

This is what the customers say about us:
Trust pilot
host Advice
host Search

Any questions?

Do not hesitate to send us a support e-mail to support@hostkoala.com or visit our page to chat with our live chat support

Server – How to obtain the local system date and time in the sharepoint 2013 workflow

Here is my workflow at server time. It is a VM server. Now I want to run my workflow with the date and time of my local system. For example, if my workflow is running on a base US-based server, and my local system time is Indian-based. Now my workflow should not run at server time at my system time. How can I do it? Is there a way to do this?

Thank you in advance.

mysql – Why is the value of the NUMERIC_SCALE column in the INFORMATION_SCHEMA.COLUMNS table for DATA_TYPE =? double & # 39; ZERO?

I have created a column whose data_type is DOUBLE,

alter table my_table add column my_column double;

When I look for that column in information_schema.columns table
I found that NUMERIC_SCALE for this column is ZERO?


from information_schema.columns

where table_schema = & # 39; my_schema & # 39;
and table_name = & # 39; my_table & # 39;
and column_name = & # 39; my_column & # 39;

+ ----------- + ------------------- + --------------- +
+ ----------- + ------------------- + --------------- +
| double | 22 | NULL |
+ ----------- + ------------------- + --------------- +

Can someone explain this behavior?

ethereum – Receive 10% of total mining premiums. what's your opinion on this?

Masternodes on the Bither platform receive 10% of the total mining lease

Enter the image description here

Providing security and authentication of the Bither platform is one of the key issues that has been extensively reviewed and reviewed to explore possible algorithms.

The innovative and optimal solution ultimately selected by the Bither Platform team (after a long process and full validation of the algorithms) was based on two complementary and comprehensive methods. The first methodology goal is to increase the initial difficulties in automatically and intelligently validating each master node that wants to be active in the Bither network. The second method is based on the use of the smart-judgment concept by the Bither platform itself.


Curated Data – Formula for "Return" in FinancialData

After I have the data for the yield, dividend and the price of a share with z.

financial data["BMY", "Return"] which yielded -0.0153019
financial data["BMY", "Dividend"] which gave 0.41
financial data["BMY", "Close"] what gave 48.16

This stock lost $ 0.76.

What exact formula does Mathematica use for this daily return on the closing price, the dividend and the loss / gain?

Why do not men take birth control?

Because it is not in the market. It would also be undesirable if it were due to its functioning.

The only way male birth control works is to lower testosterone, which in turn reduces the sperm count. However, this makes them fat, moody, unable to get an erection, weak and suffers from other signs of low testosterone. This would also have a negative impact on the development of teenage boys and teens, as it was taken over by teenagers and got into the water supply. In short, we know how a male birth control pill would work, and even tested it, but it will not come on the market because of how it works.

In addition, the pill would likely lower the birth rate to about 0.5, which would rather damage the world's economy. As it stands now, the contraceptive pill lowers the birth rate to a point where it damages the economy. So there is no reason to make matters worse with a male counterpart.


How do you handle long product titles on the phone?

I have a product card that only allows three lines of text. If it is longer, it adds an ellipse. If you want to see the full text, hover over it and the tooltip will appear with the full text. The thing is, if you're on the phone, you can not float. Which options would be useful for such cases if the text is too long?

If you now click on the title or anywhere on the map on your mobile phone or on the desktop, you will be directed to the product details.