Difference between a standard facet and it's _byname version

I have tried deriving a custom numpunct<> facet from both numpunct<> as well as from numpunct_byname<>. Both give the same results and both approaches work.

The example I tried was to override the do_truename() and do_falsename() virtual methods so as to return their German equivalents "wahr" and "falsch".

deriving from numpunct_byname<> :
http://coliru.stacked-crooked.com/a/32172a867ab56086

deriving from numpunct<> :
http://coliru.stacked-crooked.com/a/33e1190c2a783e1a

Both approaches work correctly.

Is there any difference?

How will I know which approach to adopt?

Thanks.
Registered users can post here. Sign in or register to post.